]> CyberLeo.Net >> Repos - CDN/Mosi.git/blob - src/patch/etc_rc.initdiskless-mount-anything.patch
etc/rc.conf: enable ntpd by default
[CDN/Mosi.git] / src / patch / etc_rc.initdiskless-mount-anything.patch
1 --- etc/rc.initdiskless 2009-11-30 02:55:12.000000000 +0000
2 +++ etc/rc.initdiskless 2010-01-03 16:02:27.000000000 +0000
3 @@ -190,8 +190,21 @@ # handle_remount() { # $1 = mount point
4      log "nfspt ${nfspt} mountopts ${mountopts}"
5      # prepend the nfs root if not present
6      [ `expr "$nfspt" : '\(.\)'` = "/" ] && nfspt="${nfsroot}${nfspt}"
7 -    mount_nfs $mountopts $nfspt $b
8 -    chkerr $? "mount_nfs $nfspt $b"
9 +
10 +    # <CyberLeo> Hack to allow mounting of any filesystem type, not just NFS
11 +    #  (thumbdrive w/glabel *hint hint*)
12 +    # ufs:/dev/label/conf (or nfs:server:/root -- server:/root works too, if
13 +    #  server isn't named ufs, msdosfs, etc...)
14 +    eval $(echo ${nfspt} | sed -E 's/^([^:]+):(.*)$/fstype="\1" device="\2"/')
15 +    case "${fstype}" in
16 +    ufs|msdosfs|cd9660|nfs) ;;
17 +    # Backwards compatibility. Hopefully someone didn't name their NFS server 'ufs'...
18 +    *) device="${fstype}:${device}"; fstype="nfs" ;;
19 +    esac
20 +    mount -t "${fstype}" "${device}" "${b}"
21 +    chkerr $? "mount -t ${fstype} ${device} ${b}"
22 +    # </CyberLeo>
23 +
24      to_umount="$b ${to_umount}"
25  }
26