Splitting out a first bunch of functions out to /live/live/boot/.
[live-boot-grml.git] / scripts / boot / mount-cifs.sh
1 #!/bin/sh
2
3 do_cifsmount ()
4 {
5         rc=1
6
7         if [ -x "/sbin/mount.cifs" ]
8         then
9                 if [ -z "${NFSOPTS}" ]
10                 then
11                         CIFSOPTS="-ouser=root,password="
12                 else
13                         CIFSOPTS="-o ${NFSOPTS}"
14                 fi
15
16                 log_begin_msg "Trying mount.cifs ${NFSROOT} ${mountpoint} ${CIFSOPTS}"
17                 modprobe -q cifs
18
19                 if mount.cifs "${NFSROOT}" "${mountpoint}" "${CIFSOPTS}"
20                 then
21                         rc=0
22                 fi
23         fi
24
25         return ${rc}
26 }