From: Carl Baldwin Date: Sat, 29 Oct 2005 20:34:36 +0000 (-0600) Subject: More stuff X-Git-Tag: release-0.4~41 X-Git-Url: http://git.pippins.net/embedvideo/images/static/x.gif?a=commitdiff_plain;h=4c07511b60f32ff1205fe84071ee962ea656e59d;p=backups%2F.git More stuff --- diff --git a/scripts/NOTES b/scripts/NOTES new file mode 100644 index 0000000..c304ad6 --- /dev/null +++ b/scripts/NOTES @@ -0,0 +1,3 @@ +Need to have backup group. +Mail daemon should be a member of the backup group and the group of the DVD writer in order to eject the disk. +/backup and subdirectories should have mode 660 with group sticky bit set. diff --git a/scripts/burn-imgs.sh b/scripts/burn-imgs.sh index 27f7ad2..a3b6fb2 100755 --- a/scripts/burn-imgs.sh +++ b/scripts/burn-imgs.sh @@ -4,14 +4,14 @@ PATH=$(dirname $0):/bin:/usr/bin . config.sh +# If the noburn file is there then don't burn. +[ -f "$burnlockfile" ] && exit 0 + # Discover disk images by looking for .img.md5sum files in $imagedir imgmd5=$(ls $imagedir/*.img.md5sum | head -n 1) logfile=$(tempfile) -# If the noburn file is there then don't burn. -[ -f "$burnlockfile" ] && exit 0 - # If we didn't find an non-empty file then exit gracefully [ -z "$imgmd5" ] && exit 0 [ -s "$imgmd5" ] || exit 0 diff --git a/scripts/config.sh b/scripts/config.sh index 621b76f..f2046ac 100755 --- a/scripts/config.sh +++ b/scripts/config.sh @@ -9,7 +9,7 @@ backups="$tmpdir/backup-list.db" statusfile="$tmpdir/backup-status.txt" imagedir="/backup/imgs" lastbackupfile="$imagedir/lastbackup" -dev="/dev/hdc" +dev="/dev/dvdwr" sdev="ATA:1,0,0" burnlockfile="$imagedir/noburn" diff --git a/scripts/pack-image.sh b/scripts/pack-image.sh index 60e6c50..5bbfc96 100755 --- a/scripts/pack-image.sh +++ b/scripts/pack-image.sh @@ -14,6 +14,9 @@ restorescript="$scriptsdir/restore.sh" echo "Creating directories" mkdir --mode=700 -p $datadir $imagedir $isomountdir $tmpdir +chgrp backup $imagedir +chmod g+s $imagedir +chmod g+w $imagedir echo "Creating the iso image in $isoimage" dd if=/dev/null of=$isoimage bs=1M count=0 seek=4440