diff options
author | intrigeri <intrigeri@boum.org> | 2006-01-17 22:22:52 +0000 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2006-01-17 22:22:52 +0000 |
commit | 55b02f8536feaebbebc598cfb8a3f1abc08ced1c (patch) | |
tree | da6fd08c30705f9b9f0accc60159541810255faf /src | |
parent | fa90006f17c34ed5bf10ba6f228fdab47660238d (diff) | |
download | backupninja-55b02f8536feaebbebc598cfb8a3f1abc08ced1c.tar.gz backupninja-55b02f8536feaebbebc598cfb8a3f1abc08ced1c.tar.bz2 |
code refactor: backupninja now uses vservers lib to init vservers support
(I hate duplicated code!)
Diffstat (limited to 'src')
-rwxr-xr-x | src/backupninja.in | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/backupninja.in b/src/backupninja.in index 29c4e1e..b0766eb 100755 --- a/src/backupninja.in +++ b/src/backupninja.in @@ -398,6 +398,7 @@ fi # include shared functions . $libdirectory/tools +. $libdirectory/vserver setfile $conffile @@ -422,10 +423,10 @@ getconf PGSQLDUMP /usr/bin/pg_dump getconf PGSQLDUMPALL /usr/bin/pg_dumpall getconf GZIP /bin/gzip getconf RSYNC /usr/bin/rsync -getconf vservers no -getconf VSERVERINFO /usr/sbin/vserver-info -getconf VSERVER /usr/sbin/vserver -getconf VROOTDIR `if [ -f "$VSERVERINFO" ]; then $VSERVERINFO info SYSINFO | grep '^ *vserver-Rootdir' | awk '{print $2}'; fi` + +# initialize vservers support +# (get config variables and check real vservers availability) +init_vservers nodialog if [ ! -d "$configdirectory" ]; then echo "Configuration directory '$configdirectory' not found." @@ -439,11 +440,6 @@ if [ "$UID" != "0" ]; then exit 1 fi -if [ "$vservers" == "yes" -a ! -d "$VROOTDIR" ]; then - echo "vservers option set in config, but $VROOTDIR is not a directory!" - fatal "vservers option set in config, but $VROOTDIR is not a directory!" -fi - ## Process each configuration file # by default, don't make files which are world or group readable. |