diff options
author | Harshula Jayasuriya <harshula@redhat.com> | 2013-01-09 16:23:29 +1100 |
---|---|---|
committer | Lukas Nykryn <lnykryn@redhat.com> | 2013-07-15 16:49:14 +0200 |
commit | 5df9205d3cfe993e3a685c61f776ffcf64583a80 (patch) | |
tree | 78ceac8ae36dc9f235832785113160deced567b3 /rc.d/init.d | |
parent | 2e561bda68c05efcb736fdc89b9117f21f88ff41 (diff) | |
download | initscripts-5df9205d3cfe993e3a685c61f776ffcf64583a80.tar initscripts-5df9205d3cfe993e3a685c61f776ffcf64583a80.tar.gz initscripts-5df9205d3cfe993e3a685c61f776ffcf64583a80.tar.bz2 initscripts-5df9205d3cfe993e3a685c61f776ffcf64583a80.tar.xz initscripts-5df9205d3cfe993e3a685c61f776ffcf64583a80.zip |
netfs: do not force NFS exports to be mounted before _netdev mounts
The current /etc/init.d/netfs mounts the following entries in /etc/fstab
not in the order desired by the sysadmin:
--------------------------------------------
/dev/san_test/san_vol /mnt/san ext3 _netdev 0 0
nas:/vol/vol7/afsdb /mnt/san/nfs nfs _netdev 0 0
--------------------------------------------
=> The NFS filesystem needs to be mounted after the SAN filesystem.
Looking at /etc/init.d/netfs:
--------------------------------------------
37 start)
38 # Let udev handle any backlog before trying to mount file systems
39 /sbin/udevsettle --timeout=30
40 [ -n "$NFSFSTAB" ] &&
41 {
42 [ ! -f /var/lock/subsys/portmap ] && service portmap start
43 action $"Mounting NFS filesystems: " mount -a -t nfs,nfs4
44 }
45 [ -n "$SMBFSTAB" ] && action $"Mounting SMB filesystems: " mount -a -t smbfs
46 [ -n "$CIFSFSTAB" ] && action $"Mounting CIFS filesystems: " mount -a -t cifs
47 [ -n "$NCPFSTAB" ] && action $"Mounting NCP filesystems: " mount -a -t ncpfs
48 [ -n "$NETDEVFSTAB" ] &&
49 {
...
98 }
99 touch /var/lock/subsys/netfs
100 # The 'no' applies to all listed filesystem types. See mount(8).
101 action $"Mounting other filesystems: " mount -a -t nonfs,nfs4,smbfs,cifs,ncpfs,gfs
--------------------------------------------
=> The NFS filesystems are mounted *before* _netdev regardless of what
the sysadmin wants.
So, let's defer all the mounts, NFS, SMB, CIFS, etc, to the final mount -a and only do all the necessary prereqs in the conditional clauses. This gives the sysadmin the ability to order netfs mounts as they see fit.
Signed-off-by: Harshula Jayasuriya <harshula@redhat.com>
Diffstat (limited to 'rc.d/init.d')
-rwxr-xr-x | rc.d/init.d/netfs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rc.d/init.d/netfs b/rc.d/init.d/netfs index 81784124..263accff 100755 --- a/rc.d/init.d/netfs +++ b/rc.d/init.d/netfs @@ -37,10 +37,10 @@ case "$1" in [ -n "$NFSFSTAB" ] && { [ ! -f /var/lock/subsys/rpcbind ] && service rpcbind start - action $"Mounting NFS filesystems: " mount -a -t nfs,nfs4 + echo $"NFS filesystems queued to be mounted" } - [ -n "$CIFSFSTAB" ] && action $"Mounting CIFS filesystems: " mount -a -t cifs - [ -n "$NCPFSTAB" ] && action $"Mounting NCP filesystems: " mount -a -t ncpfs + [ -n "$CIFSFSTAB" ] && echo $"CIFS filesystems queued to be mounted" + [ -n "$NCPFSTAB" ] && echo $"NCP filesystems queued to be mounted" [ -n "$NETDEVFSTAB" ] && { if [ -f /etc/mdadm.conf ] && [ -x /sbin/mdadm ]; then @@ -99,7 +99,7 @@ case "$1" in } touch /var/lock/subsys/netfs # The 'no' applies to all listed filesystem types. See mount(8). - action $"Mounting other filesystems: " mount -a -t nonfs,nfs4,cifs,ncpfs,gfs2 + action $"Mounting filesystems: " mount -a -t nogfs2 ;; stop) # Unmount loopback stuff first |