Source
echo "$hdinstall_path not writable for us, please specify umask=000 as option to mount"
# -------------------------------------------------------------------------
# creates a script to do a direct-hd-install 3.6.2
#
# Creation: 2008-02-24 jb / LanSpezi
# Last Update: $Id: mkhdinstall.sh 20065 2011-09-06 20:16:23Z sklein $
# -------------------------------------------------------------------------
scr_mounted=
example()
{
cat <<EOF
Either add
<device> <mount point> vfat rw,user,noauto,umask=000 0 0
to /etc/fstab or mount the device before invoking mkfli4l.sh,
for instance like follows
[sudo] mount <device> <mount point> -t vfat -o umask=000
or as complete sequence:
sudo mount <device> <mount point> -t vfat -o umask=000 && \
sh mkfli4l.sh --hdinstallpath <mount point> ; \
sudo umount <mount point>
EOF
}
check_mount()
{
device=
line=`mount | grep "on $1"`
if [ "$line" ]; then
set $line
real_device=$1
device=`echo $1 | sed -e 's#.*/##;s#[0-9]*$##'`
fs=$5
return 0
fi
return 1
}
mkhdinstall ()
{
if ! check_mount $hdinstall_path; then
# try to mount it as normal user
scr_mounted=yes
echo "-> mounting $hdinstall_path ..."
if ! mount $hdinstall_path 2> /dev/null || ! check_mount $hdinstall_path; then
# still not mounted, so no user entry in /etc/fstab
{
cat <<EOF
Unable to mount usb device, please either mount it before invoking
mkfli4l.sh or add an entry in /etc/fstab allowing us to mount the device.
EOF
example
} | log_error
abort
fi
fi
if [ "$fs" != vfat ]; then