#---------------------------------------------------------------------------- # /var/install/include/check-mounts - check mounts # # Creation : 2014-02-07 hbfl # Last Update: $Id$ # # Copyright (c) 2014-@@YEAR@@ the eisfair team, team(at)eisfair(dot)org # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- # --------------------------------------------------------------------------- # cdrom and usb handling # --------------------------------------------------------------------------- mount_cdrom () { if ! mount | grep -q '/cdrom' then /var/install/bin/system-devices-mount-cdrom retvar=${?} if [ ${retvar} -eq 0 ] then cdrom_mounted=true echo "DATETIME" >/tmp/cdrom_installer_mounted fi fi } umount_cdrom () { if "${cdrom_mounted:-false}" then /var/install/bin/system-devices-umount-cdrom retvar=${?} if [ ${retvar} -eq 0 ] then cdrom_mounted=false fi fi } mount_usb () { # extract media/usb/sd.. from $url like # file:///media/usb/sd../download/packages/eis-list.txt usb_dev=$(echo ${eislist} | cut -d/ -f3-6) if ! mount | grep -q "${usb_dev}" #>/dev/null then /var/install/bin/system-devices-mount-usb retvar=${?} if [ ${retvar} -eq 0 ] then usb_mounted=true echo "DATETIME" >/tmp/usb_installer_mounted fi fi } umount_usb () { if "${usb_mounted:-false}" then /var/install/bin/system-devices-umount-usb retvar=${?} if [ ${retvar} -eq 0 ] then usb_mounted=false fi fi } # --------------------------------------------------------------------------- # end # ---------------------------------------------------------------------------