initial commit of a *whole bunch* of old Egressive shell scripts, used to make many people redundant.
This commit is contained in:
commit
43e0f5b59e
329 changed files with 31937 additions and 0 deletions
33
egrdbackup/initial.sh.label.example
Executable file
33
egrdbackup/initial.sh.label.example
Executable file
|
@ -0,0 +1,33 @@
|
|||
#/bin/bash
|
||||
#
|
||||
# This script runs before the main rdiffbackup script
|
||||
# useful for mounting USB drives
|
||||
#
|
||||
#
|
||||
#
|
||||
USB_PREFIX="mdaakl0"
|
||||
POSSIBLE_USB_DRIVES="1 2 3 4"
|
||||
MOUNT_POINT="/mnt"
|
||||
USB_DRIVE="unknowndrive"
|
||||
MOUNT_OPTIONS="rw,noatime,acl"
|
||||
#
|
||||
#
|
||||
if mount | grep $MOUNT_POINT
|
||||
then echo "WARNING - A Drive is already mounted on $MOUNT_POINT">> $LOGFILE 2>> $LOGFILE
|
||||
INITIAL_CMD_FILE_OK="false"
|
||||
else
|
||||
for i in $POSSIBLE_USB_DRIVES
|
||||
do
|
||||
if mount LABEL=$USB_PREFIX$i $MOUNT_POINT -o $MOUNT_OPTIONS
|
||||
then
|
||||
USB_DRIVE="$USB_PREFIX$i"
|
||||
echo "Using $USB_DRIVE on $MOUNT_POINT">> $LOGFILE 2>> $LOGFILE
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ $USB_DRIVE == "unknowndrive" -o $MOUNT_POINT"xxx" == "xxx" ]
|
||||
then
|
||||
echo "ERROR - Was not able to mount the USB drive, either the Device is not available, or the mount point does not exist" >> $LOGFILE 2>> $LOGFILE
|
||||
INITIAL_CMD_FILE_OK="false"
|
||||
fi
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue