find ${cwd}/build -type f -exec touch {} + > /dev/null
# Change some properties of testfile
chmod 740 ${cwd}/build/testfile
-perm_after=`stat -c %a ${cwd}/build/testfile`
+perm_after=`$bperl -e "get_perm('${cwd}/build/testfile')"`
# Run backup for the second time, this time we expect that only metadata part for each file will be
# backed up, so we expect the backup size to be much smaller than the first one.
fi
# Check if testfile's restored permission are correctly changed
-perm_restored=`stat -c %a ${cwd}/tmp/bacula-restores/${cwd}/build/testfile`
+perm_restored=`$bperl -e "get_perm('${cwd}/tmp/bacula-restores/${cwd}/build/testfile')"`
if [ ${perm_after} -ne ${perm_restored} ]; then
estat=1
print_debug "Wrong permissions restored: ${perm_restored}, expected: ${perm_after}"
dstat=0
# Turn off verbose file listing, rerun verify jobs and check if files are not listed as expected
-sed -i '/console =*/ s/$/, !verified/g' bin/bacula-dir.conf | grep verified
-sed -i '/director =*/ s/$/, !verified/g' bin/bacula-fd.conf | grep verified
+sed '/console =*/ s/$/, !verified/g' $conf/bacula-dir.conf > $tmp/1
+mv $tmp/1 $conf/bacula-dir.conf
+
+sed '/director =*/ s/$/, !verified/g' $conf/bacula-fd.conf > $tmp/1
+mv $tmp/1 $conf/bacula-fd.conf
cat <<END_OF_DATA >tmp/bconcmds
@output /dev/null
@# now do a verify volume
@#
@$out ${cwd}/tmp/log2.out
-setdebug level=10 client
+setdebug level=10 client trace=1
run job=VerifyData jobid=1 yes
run job=VerifyData jobid=2 yes
run job=VerifyData jobid=3 yes
if [ x$FORCE_DEDUP = xyes -o x$FORCE_CLOUD = xyes ]; then
nbok=6
elif [ x$FORCE_ALIGNED = xyes ]; then
- sed -i 's/DUALCASE/PUALCASE/g' $tmp/TestVolume001.add
+ sed 's/DUALCASE/PUALCASE/g' $tmp/TestVolume001.add > $tmp/1
+ mv $tmp/1 $tmp/TestVolume001.add
else
- sed -i 's/DUALCASE/PUALCASE/g' $tmp/TestVolume001
+ sed 's/DUALCASE/PUALCASE/g' $tmp/TestVolume001 > $tmp/1
+ mv $tmp/1 $tmp/TestVolume001
fi
cat <<END_OF_DATA >tmp/bconcmds
stop_bacula
# Turn off verbose file listing, rerun verify jobs and check if files are not listed as expected
-sed -i '/console =*/ s/$/, !verified/g' bin/bacula-dir.conf | grep verified
-sed -i '/director =*/ s/$/, !verified/g' bin/bacula-fd.conf | grep verified
+sed '/console =*/ s/$/, !verified/g' $conf/bacula-dir.conf > $tmp/1
+mv $tmp/1 $conf/bacula-dir.conf
+
+sed '/director =*/ s/$/, !verified/g' $conf/bacula-fd.conf > $tmp/1
+mv $tmp/1 $conf/bacula-fd.conf
cat <<END_OF_DATA >tmp/bconcmds
@output /dev/null
dstat=0
# Turn off verbose file listing, rerun verify jobs and check if files are not listed as expected
-sed -i '/console =*/ s/$/, !verified/g' bin/bacula-dir.conf | grep verified
-sed -i '/director =*/ s/$/, !verified/g' bin/bacula-fd.conf | grep verified
+sed '/console =*/ s/$/, !verified/g' $conf/bacula-dir.conf > $tmp/1
+mv $tmp/1 $conf/bacula-dir.conf
+
+sed '/director =*/ s/$/, !verified/g' $conf/bacula-fd.conf > $tmp/1
+mv $tmp/1 $conf/bacula-fd.conf
cat <<END_OF_DATA >tmp/bconcmds
@output /dev/null