Adding warning messages if the necessary tools are not installed.
authorDaniel Baumann <daniel@debian.org>
Thu, 16 Aug 2012 09:48:07 +0000 (11:48 +0200)
committerDaniel Baumann <daniel@debian.org>
Thu, 16 Aug 2012 09:50:21 +0000 (11:50 +0200)
bin/live-update-initramfs
bin/live-uptime

index 23656a4..686602e 100755 (executable)
 
 set -e
 
+if [ ! -e /usr/sbin/update-initramfs.initramfs-tools ]
+then
+       echo "E: /usr/sbin/update-initramfs.initramfs-tools - command not found"
+       echo "E: On Debian based systems, update-initramfs from initramfs-tools"
+       echo "E: can be installed with:"
+       echo "E:   apt-get install initramfs-tools"
+
+       exit 1
+fi
+
 if grep -qs "boot=live" /proc/cmdline
 then
        if grep -qs "\/live\/image" /proc/mounts
index 0e1af12..cecbf84 100755 (executable)
 
 set -e
 
+if [ ! -e /usr/bin/uptime.procps ]
+then
+       echo "E: /usr/bin/uptime.procps - command not found"
+       echo "E: On Debian based systems, uptime from procps"
+       echo "E: can be installed with:"
+       echo "E:   apt-get install procps"
+
+       exit 1
+fi
+
 _UPTIME="$(/usr/bin/uptime.procps)"
 
 _DATE_HOST="$(date +%s)"