diff options
author | aszlig <aszlig@redmoonstudios.org> | 2013-07-29 07:33:58 +0200 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2013-07-30 05:59:40 +0200 |
commit | cd4b5e1a35863f7c79c47c8dc874b23b423f71f8 (patch) | |
tree | 3c61208c1850bfe8d1e2bd804f48c06c81721668 /pkgs/build-support | |
parent | 4c9ba428f9c08c000259a403b1bec5179d4f5428 (diff) | |
download | nixlib-cd4b5e1a35863f7c79c47c8dc874b23b423f71f8.tar nixlib-cd4b5e1a35863f7c79c47c8dc874b23b423f71f8.tar.gz nixlib-cd4b5e1a35863f7c79c47c8dc874b23b423f71f8.tar.bz2 nixlib-cd4b5e1a35863f7c79c47c8dc874b23b423f71f8.tar.lz nixlib-cd4b5e1a35863f7c79c47c8dc874b23b423f71f8.tar.xz nixlib-cd4b5e1a35863f7c79c47c8dc874b23b423f71f8.tar.zst nixlib-cd4b5e1a35863f7c79c47c8dc874b23b423f71f8.zip |
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>
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/vm/default.nix | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index 987da5585195..063341ce1d7b 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -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..." |