From 14bfcd8854f13eadf94350e55035a63228a77736 Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Fri, 5 May 2017 11:40:03 +0200 Subject: add sinkdo rval checking, add sfdisk, fix incorrect path check --- make-boot-image.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/make-boot-image.sh b/make-boot-image.sh index 1b018f3..5153ffc 100755 --- a/make-boot-image.sh +++ b/make-boot-image.sh @@ -81,7 +81,7 @@ then $ROOTCMD apt-get update [ "x$DEVEL_MODE" = "xy" ] && $ROOTCMD apt-get install qemu-system-x86 # Dependencies to put into the initrd $ROOTCMD apt-get install dmidecode pciutils usbutils lshw sysstat iftop strace - $ROOTCMD apt-get install partclone udpcast gdisk efibootmgr tcpdump + $ROOTCMD apt-get install partclone sfdisk udpcast gdisk efibootmgr tcpdump > "$WORKDIR/apt-done" fi @@ -249,7 +249,7 @@ then # When using sudo with password auth, ask and cache pass first $ROOTCMD dumpkeys | $ROOTCMD loadkeys -b > "$WORKDIR/initrd/etc/keys.bmap" fi -if [ ! -f "$WORKDIR/initrd/partclone-restore" ] +if [ ! -f "$WORKDIR/initrd/usr/sbin/partclone.restore" ] then ( set +x PATH="$WORKDIR/kernel/tools/perf:/usr/sbin:/usr/bin:/sbin:/bin" @@ -258,7 +258,7 @@ then ( # Manpage display mkchroot "$WORKDIR/initrd" strace groff nroff troff grotty gtbl # Cloning tools - mkchroot "$WORKDIR/initrd" /usr/sbin/partclone* efibootmgr gdisk udp-receiver + mkchroot "$WORKDIR/initrd" /usr/sbin/partclone* efibootmgr sfdisk gdisk sgdisk udp-receiver # Some dyn-loaded libraries (ldd will not display them) mkchroot "$WORKDIR/initrd" /lib/x86_64-linux-gnu/libusb-1.0.so.0 cp -ar /lib/terminfo "$WORKDIR/initrd/lib/" @@ -498,8 +498,9 @@ do then # Inform sinkcat about end-of-data touch -- "$SINKDIR/zz" wait + res=$? # Error code from "./$f" # sinkcat always rmdir "$SINKDIR" on normal exit - if [ -d "$SINKDIR" ] + if [ $res -ne 0 -o -d "$SINKDIR" ] then echo "Task $task has ran into troubles" >&2 exit 3 fi -- cgit v1.2.3