I think we can safely give rundir a default value.
authorCarl N Baldwin <cnb@plane.localdomain>
Wed, 30 Nov 2005 03:03:05 +0000 (20:03 -0700)
committerCarl N Baldwin <cnb@plane.localdomain>
Wed, 30 Nov 2005 03:03:05 +0000 (20:03 -0700)
scripts/restore-script.sh

index c95b8400fbc9496f57f9b8c34dc6a852a7acf201..e4fba472fb79803735f4032fc5b131c631e02c01 100755 (executable)
@@ -8,7 +8,8 @@ function err() {
 [ -n "$3" ] && mountdir=$3
 
 [ -z "$mountdir" ] && err '$mountdir must be set'
-[ -z "$rundir"   ] && err '$rundir must be set'
+
+rundir=${rundir:-$(dirname $0)}
 
 export PATH=${rundir%/}:/bin:/usr/bin:/sbin:/usr/sbin:/sw/bin