summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2017-05-05 11:40:03 +0200
committerLudovic Pouzenc <ludovic@pouzenc.fr>2017-05-05 11:40:03 +0200
commit14bfcd8854f13eadf94350e55035a63228a77736 (patch)
tree32f6eff93ce6245b9ebd3ddd60852e4849744516
parenta52ed4da2cc8d70a1d2e271fee13cd10ce4e0a47 (diff)
downloadeficast-14bfcd8854f13eadf94350e55035a63228a77736.tar.gz
eficast-14bfcd8854f13eadf94350e55035a63228a77736.tar.bz2
eficast-14bfcd8854f13eadf94350e55035a63228a77736.zip
add sinkdo rval checking, add sfdisk, fix incorrect path check
-rwxr-xr-xmake-boot-image.sh9
1 files 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