From 42ac8a00e1a6a5c6df1a9bafb8a352555dacf747 Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Wed, 27 Sep 2017 18:09:29 +0200 Subject: Add autorun.sh wrapper to get it available on PATH (easier to restart it) --- make-boot-image.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/make-boot-image.sh b/make-boot-image.sh index 9eaf529..6faf09a 100755 --- a/make-boot-image.sh +++ b/make-boot-image.sh @@ -374,7 +374,7 @@ nfs_autorun() { if [ -x /mnt/nfs/autorun.sh ] then echo_color white green "----- NFS server ready ------" echo_color green black "autorun.sh script will run on tty1 now" - cd /mnt/nfs && ./autorun.sh + autorun.sh else echo_color white red "----- NFS server NOT ready ------" fi @@ -406,7 +406,6 @@ rescue_shell() { PS1='\h:\w# ' setsid cttyhack /bin/busybox sh sync umount /dev /sys /proc - #umount /dev/pts /dev /sys /proc reboot -f } @@ -416,8 +415,6 @@ mount_pseudofilesystems() { mount -t sysfs none /sys || return $? mount -t devtmpfs -o size=1m none /dev || return $? ln -s /proc/self/fd/2 /dev/stderr - #mkdir /dev/pts - #mount -t devpts none /dev/pts return 0 } @@ -506,6 +503,14 @@ fi EOF chmod +x "$WORKDIR/initrd/bin/rc2_once.sh" +cat > "$WORKDIR/initrd/bin/autorun.sh" <<"EOF" +#!/bin/busybox sh +# Helper script to have retries handy +cd /mnt/nfs +./autorun.sh +EOF +chmod +x "$WORKDIR/initrd/bin/autorun.sh" + # XXX workaround, kernel makefile's cpio preseves everything and it is not so cool for us $ROOTCMD chown -R root: "$WORKDIR/initrd" -- cgit v1.2.3