]> gitweb.fluxo.info Git - hydra.git/commitdiff
Check BASE on chroot-upgrade
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 6 Jan 2014 13:53:47 +0000 (11:53 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 6 Jan 2014 13:53:47 +0000 (11:53 -0200)
share/hydractl/chroot-upgrade

index 51cd9198597bba999239a98d730e2b7e7a3141dc..ea2b736dd9e9b2f61598edc01db04715ee09be9b 100755 (executable)
@@ -24,6 +24,11 @@ if [ "`whoami`" != 'root' ]; then
   sudo="sudo"
 fi
 
+# Check base
+if [ ! -d "$BASE" ]; then
+  exit
+fi
+
 # Upgrade all chroots
 for chroot in `ls $BASE`; do
   folder="$BASE/$chroot"