X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=src%2Fninjahelper.in;h=7497b69e6337714d5f618ddb1dba3736db3d0ab5;hb=7e82705e20a31d3bbcf30794386294434e34e5c2;hp=104575944d4a376aae9e5ac9d54d800d2ce2221d;hpb=593ac880e58730a58fc87576d7ec9ece07aeef13;p=matthijs%2Fupstream%2Fbackupninja-vserver.git diff --git a/src/ninjahelper.in b/src/ninjahelper.in index 1045759..7497b69 100755 --- a/src/ninjahelper.in +++ b/src/ninjahelper.in @@ -23,7 +23,7 @@ function check_perms() { ## ## returns the next available file name given a file ## in the form @CFGDIR@/backup.d/10.sys -## sets variable $returned_filename +## sets variable $next_filename ## get_next_filename() { next_filename=$1 @@ -41,7 +41,7 @@ get_next_filename() { ## installs packages (passed in as $@) if not present ## require_packages() { - for pkg in "$@"; do + for pkg in "$@"; do installed=`dpkg -s $pkg | grep 'ok installed'` if [ -z "$installed" ]; then booleanBox "install $pkg?" "This backup action requires package $pkg. Do you want to install it now?" @@ -196,6 +196,15 @@ if [ ! -d "$scriptdir" ]; then echo "Script directory $scriptdir not found." exit 1 fi +libdir=`grep libdirectory $conffile | awk '{print $3}'` +if [ ! -n "$libdir" ]; then + echo "Cound not find entry 'libdirectory' in $conffile" + exit 1 +fi +if [ ! -d "$libdir" ]; then + echo "Script directory $libdir not found." + exit 1 +fi configdirectory=`grep configdirectory $conffile | awk '{print $3}'` if [ ! -n "$configdirectory" ]; then echo "Cound not find entry 'configdirectory' in $conffile" @@ -206,7 +215,7 @@ if [ ! -d "$configdirectory" ]; then exit 1 fi -. $scriptdir/easydialog.sh +. $libdir/easydialog.sh if [ "$UID" != "0" ]; then msgBox "warning" "ninjahelper must be run by root!"