4 #following would be in the .config file
6 install_script="install_nimbus.sh"
7 enable_logic_flag_file=".flag"
10 #get the semaphore, 0 - disbaled, 1- enabled
11 flag=$(cat ${enable_logic_flag_file})
13 #check if device is mounted already
14 test=$(mount | grep ${device_name})
15 if [ "$flag" == "1" ]; then
16 if [ -e ${device_name} ] && [ ! "${test}" ]; then
18 mount -t iso9660 -v -o loop /dev/vde/ /mnt/iso
19 #if availabe run the install script (it contains the install.sh steps)
20 if [ -e "${install_script}" ] && [ -f "${install_script}" ]; then
23 #disable the script from attempting to
24 # mount and run install again until needed;
25 echo "0" > ${enable_logic_flag_file}
26 #if nedeed add step to comment out the crontab line here;
29 echo "Auto mounting ISO & run install logic disabled!"
33 # * * * * * /mount_iso_script.sh