mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
fillDiskWithDebs: Create fake start-stop-daemon.
This is needed in order to prevent services from starting while populating the image with the contents of the .deb files. The procedure used here is exactly the same as used in debootstrap. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
4c9ba428f9
commit
cd4b5e1a35
@ -599,8 +599,17 @@ rec {
|
||||
debs="$debs /inst/$i";
|
||||
done
|
||||
chroot=$(type -tP chroot)
|
||||
|
||||
# Create a fake start-stop-daemon script, as done in debootstrap.
|
||||
mv "/mnt/sbin/start-stop-daemon" "/mnt/sbin/start-stop-daemon.REAL"
|
||||
echo "#!/bin/true" > "/mnt/sbin/start-stop-daemon"
|
||||
chmod 755 "/mnt/sbin/start-stop-daemon"
|
||||
|
||||
PATH=/usr/bin:/bin:/usr/sbin:/sbin $chroot /mnt \
|
||||
/usr/bin/dpkg --install --force-all $debs < /dev/null || true
|
||||
|
||||
# Move the real start-stop-daemon back into its place.
|
||||
mv "/mnt/sbin/start-stop-daemon.REAL" "/mnt/sbin/start-stop-daemon"
|
||||
done
|
||||
|
||||
echo "running post-install script..."
|
||||
|
Loading…
Reference in New Issue
Block a user