summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic.pouzenc@mines-albi.fr>2017-09-27 18:09:29 +0200
committerLudovic Pouzenc <ludovic.pouzenc@mines-albi.fr>2017-09-27 18:09:29 +0200
commit42ac8a00e1a6a5c6df1a9bafb8a352555dacf747 (patch)
tree27c287be3ae08f50fd1d260a1f63f419156ce534
parent0a827560667bcf151c3f0a4d23ed62e283230fee (diff)
downloadeficast-42ac8a00e1a6a5c6df1a9bafb8a352555dacf747.tar.gz
eficast-42ac8a00e1a6a5c6df1a9bafb8a352555dacf747.tar.bz2
eficast-42ac8a00e1a6a5c6df1a9bafb8a352555dacf747.zip
Add autorun.sh wrapper to get it available on PATH (easier to restart it)
-rwxr-xr-xmake-boot-image.sh13
1 files 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"