From 7cae2ca69a31ae49df6f51d0ffec7e81c9f744ef Mon Sep 17 00:00:00 2001 From: zador-blood-stained Date: Sun, 29 May 2016 23:08:54 +0300 Subject: [PATCH] Proper bugfix for losing original initctl and start-stop-daemon in debootstrap-ng --- debootstrap-ng.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debootstrap-ng.sh b/debootstrap-ng.sh index 259c61c50b..9b61d90702 100644 --- a/debootstrap-ng.sh +++ b/debootstrap-ng.sh @@ -497,12 +497,12 @@ create_image() # install_dummy_initctl() { - if [[ -x $CACHEDIR/sdcard/sbin/start-stop-daemon ]] && ! cmp -s $CACHEDIR/sdcard/sbin/start-stop-daemon $CACHEDIR/sdcard/sbin/start-stop-daemon.REAL; then + if [[ -x $CACHEDIR/sdcard/sbin/start-stop-daemon ]] && ! cmp -s $CACHEDIR/sdcard/sbin/start-stop-daemon <(printf '#!/bin/sh\necho "Warning: Fake start-stop-daemon called, doing nothing"'); then mv $CACHEDIR/sdcard/sbin/start-stop-daemon $CACHEDIR/sdcard/sbin/start-stop-daemon.REAL printf '#!/bin/sh\necho "Warning: Fake start-stop-daemon called, doing nothing"' > $CACHEDIR/sdcard/sbin/start-stop-daemon chmod 755 $CACHEDIR/sdcard/sbin/start-stop-daemon fi - if [[ -x $CACHEDIR/sdcard/sbin/initctl ]] && ! cmp -s $CACHEDIR/sdcard/sbin/initctl $CACHEDIR/sdcard/sbin/initctl.REAL; then + if [[ -x $CACHEDIR/sdcard/sbin/initctl ]] && ! cmp -s $CACHEDIR/sdcard/sbin/initctl <(printf '#!/bin/sh\necho "Warning: Fake initctl called, doing nothing"'); then mv $CACHEDIR/sdcard/sbin/initctl $CACHEDIR/sdcard/sbin/initctl.REAL printf '#!/bin/sh\necho "Warning: Fake initctl called, doing nothing"' $CACHEDIR/sdcard/sbin/initctl chmod 755 $CACHEDIR/sdcard/sbin/initctl