Release new version 1:20210208+grml.5
[live-boot-grml.git] / components / 9990-mount-cifs.sh
1 #!/bin/sh
2
3 #set -e
4
5 do_cifsmount ()
6 {
7         rc=1
8
9         if [ -x "/sbin/mount.cifs" ]
10         then
11                 if [ -z "${NFSOPTS}" ]
12                 then
13                         CIFSOPTS="-o user=root,password="
14                 else
15                         CIFSOPTS="-o ${NFSOPTS}"
16                 fi
17
18                 log_begin_msg "Trying mount.cifs ${NFSROOT} ${mountpoint} ${CIFSOPTS}"
19                 modprobe -q cifs
20
21                 if mount.cifs "${NFSROOT}" "${mountpoint}" ${CIFSOPTS}
22                 then
23                         rc=0
24                 fi
25         fi
26
27         return ${rc}
28 }