From e7917e71a28b6547e3584b63fd69dc2db228d68f Mon Sep 17 00:00:00 2001 From: smckown Date: Fri, 18 Apr 2008 14:42:05 +0000 Subject: [PATCH] Running under at, root does not get /sbin or /usr/sbin in the path. Add it in the script. --- bpcbackup | 5 +++-- bpcdump | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bpcbackup b/bpcbackup index d70d228..f22e780 100755 --- a/bpcbackup +++ b/bpcbackup @@ -8,6 +8,7 @@ # on the HNs. Only the HN hosting the BPC VE will do anything. VEID=1158 +export PATH=/sbin:/usr/sbin:$PATH # Complain if this script is running on a server not configured with OpenVZ if [ ! -x /usr/sbin/vzctl ]; then @@ -27,9 +28,9 @@ fi # will error. This is correct, since we cannot auto-mount esata, since it # has to be physically connected first, and may require authentication on mount # if the volume is encrypted. -bpcdump +/usr/local/bin/bpcdump ret=$? -esata umount +/usr/local/bin/esata umount ret2=$? [ "$ret" != "0" ] && exit $ret [ "$ret2" != "0" ] && exit $ret2 diff --git a/bpcdump b/bpcdump index 6c14bbd..394e78d 100755 --- a/bpcdump +++ b/bpcdump @@ -18,6 +18,7 @@ VEMNT=/var/lib/vz/private/$VEID EXTFS=/media/esata unset WRITEPAR INFO=/dev/null +export PATH=/sbin:/usr/sbin:$PATH # FUNCTIONS -- 2.39.2