#!/bin/bash # Mount the backup partition DEV #+ and execute all *.active scripts in the SCRIPTDIR directory MOUNTPOINT="/tmp/backup_partition" DEV="/dev/sda4" ERR_NOSCRIPT=2 [ -d $MOUNTPOINT ] || mkdir $MOUNTPOINT mount $DEV $MOUNTPOINT [ ! -d $SCRIPTDIR ] && exit $ERR_NOSCRIPT for s in $SCRIPTDIR/*.active do [ -x $s ] && ./$s done umount $DEV