Deleted Added
full compact
mountcritremote (298514) mountcritremote (301004)
1#!/bin/sh
2#
1#!/bin/sh
2#
3# $FreeBSD: head/etc/rc.d/mountcritremote 298514 2016-04-23 16:10:54Z lme $
3# $FreeBSD: head/etc/rc.d/mountcritremote 301004 2016-05-30 19:59:51Z ngie $
4#
5
6# PROVIDE: mountcritremote
7# REQUIRE: NETWORKING FILESYSTEMS ipsec netwait
8# KEYWORD: nojail
9
10. /etc/rc.subr
11

--- 18 unchanged lines hidden (view full) ---

30 load_kld -m nfs nfscl || return 1
31 ;;
32 esac
33 return 0
34}
35
36mountcritremote_start()
37{
4#
5
6# PROVIDE: mountcritremote
7# REQUIRE: NETWORKING FILESYSTEMS ipsec netwait
8# KEYWORD: nojail
9
10. /etc/rc.subr
11

--- 18 unchanged lines hidden (view full) ---

30 load_kld -m nfs nfscl || return 1
31 ;;
32 esac
33 return 0
34}
35
36mountcritremote_start()
37{
38 local mounted_remote_filesystem=false
39
38 # Mount nfs filesystems.
39 #
40 case "`/sbin/mount -d -a -t nfs`" in
41 '')
42 ;;
43 *)
40 # Mount nfs filesystems.
41 #
42 case "`/sbin/mount -d -a -t nfs`" in
43 '')
44 ;;
45 *)
46 mounted_remote_filesystem=true
44 echo -n 'Mounting NFS filesystems:'
45 mount -a -t nfs
46 echo '.'
47 ;;
48 esac
49
50 # Mount other network filesystems if present in /etc/fstab.
51 case ${extra_netfs_types} in

--- 7 unchanged lines hidden (view full) ---

59 for i in ${netfs_types}; do
60 fstype=${i%:*}
61 fsdecr=${i#*:}
62
63 [ "${fstype}" = "nfs" ] && continue
64
65 case "`mount -d -a -t ${fstype}`" in
66 *mount_${fstype}*)
47 echo -n 'Mounting NFS filesystems:'
48 mount -a -t nfs
49 echo '.'
50 ;;
51 esac
52
53 # Mount other network filesystems if present in /etc/fstab.
54 case ${extra_netfs_types} in

--- 7 unchanged lines hidden (view full) ---

62 for i in ${netfs_types}; do
63 fstype=${i%:*}
64 fsdecr=${i#*:}
65
66 [ "${fstype}" = "nfs" ] && continue
67
68 case "`mount -d -a -t ${fstype}`" in
69 *mount_${fstype}*)
70 mounted_remote_filesystem=true
67 echo -n "Mounting ${fsdecr} filesystems:"
68 mount -a -t ${fstype}
69 echo '.'
70 ;;
71 esac
72 done
73
71 echo -n "Mounting ${fsdecr} filesystems:"
72 mount -a -t ${fstype}
73 echo '.'
74 ;;
75 esac
76 done
77
74 # Cleanup /var again just in case it's a network mount.
75 /etc/rc.d/cleanvar quietreload
76 rm -f /var/run/clean_var /var/spool/lock/clean_var
78 if $mounted_remote_filesystem; then
79 # Cleanup /var again just in case it's a network mount.
80 /etc/rc.d/cleanvar quietreload
81 rm -f /var/run/clean_var /var/spool/lock/clean_var
82
83 # Regenerate the ldconfig hints in case there are additional
84 # library paths on remote file systems
85 /etc/rc.d/ldconfig quietstart
86 fi
77}
78
79load_rc_config $name
80run_rc_command "$1"
87}
88
89load_rc_config $name
90run_rc_command "$1"