netfs: added initscript script which mounts network shares defined in /etc/fstab after network
This commit is contained in:
parent
12f2fb6d32
commit
b1edfb0fcf
@ -38,7 +38,7 @@ case "$1" in
|
|||||||
# below. All file systems that are added to the variable in the
|
# below. All file systems that are added to the variable in the
|
||||||
# form of no<filesystem> will be skipped.
|
# form of no<filesystem> will be skipped.
|
||||||
|
|
||||||
NO_FS="nonfs,nosmbfs,noproc,nosysfs,nousbdevfs,nodevfs"
|
NO_FS="nonfs,nonfs4,nosmbfs,nocifs,noproc,nosysfs,nousbdevfs,nodevfs"
|
||||||
|
|
||||||
echo -n "Mounting remaining file systems: "
|
echo -n "Mounting remaining file systems: "
|
||||||
mount -a -t $NO_FS
|
mount -a -t $NO_FS
|
||||||
@ -53,7 +53,7 @@ case "$1" in
|
|||||||
# [ -f /proc/bus/usb/devices ] && umount /proc/bus/usb >/dev/null 2>&1
|
# [ -f /proc/bus/usb/devices ] && umount /proc/bus/usb >/dev/null 2>&1
|
||||||
# umount -l /proc
|
# umount -l /proc
|
||||||
# umount -l /sys
|
# umount -l /sys
|
||||||
NO_FS="nonfs,nosmbfs,noproc,nosysfs,nousbdevfs,nodevfs"
|
NO_FS="nonfs,nonfs4,nosmbfs,nocifs,noproc,nosysfs,nousbdevfs,nodevfs"
|
||||||
sync
|
sync
|
||||||
umount -a -f -r -t $NO_FS >/dev/null 2>&1
|
umount -a -f -r -t $NO_FS >/dev/null 2>&1
|
||||||
evaluate_retval
|
evaluate_retval
|
||||||
|
35
etc/rc.d/init.d/netfs
Executable file
35
etc/rc.d/init.d/netfs
Executable file
@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# mountfs - File System Mount Script
|
||||||
|
|
||||||
|
# Based on mountfs script from LFS-3.1 and earlier.
|
||||||
|
# Rewritten by Gerard Beekmans <gerard@linuxfromscratch.org>
|
||||||
|
# Modified by Davide Madrisan <davide.madrisan@gmail.com>
|
||||||
|
|
||||||
|
. /etc/sysconfig/rc
|
||||||
|
. $rc_functions
|
||||||
|
|
||||||
|
KERNELMIN=`uname -r | sed -e 's,[^\.]*\.,,' -e 's,\..*,,'`
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
|
||||||
|
NET_FS="nfs,smbfs,cifs"
|
||||||
|
|
||||||
|
echo -n "Mounting network file systems: "
|
||||||
|
mount -a -t $NET_FS
|
||||||
|
evaluate_retval
|
||||||
|
echo
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
echo -n "Unmounting currently mounted network file systems: "
|
||||||
|
NET_FS="nfs,smbfs,cifs"
|
||||||
|
sync
|
||||||
|
umount -a -f -r -t $NET_FS >/dev/null 2>&1
|
||||||
|
evaluate_retval
|
||||||
|
echo
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|stop}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
1
etc/rc.d/rc0.d/K80netfs
Symbolic link
1
etc/rc.d/rc0.d/K80netfs
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../init.d/netfs
|
1
etc/rc.d/rc3.d/S92netfs
Symbolic link
1
etc/rc.d/rc3.d/S92netfs
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../init.d/netfs
|
1
etc/rc.d/rc4.d/S92netfs
Symbolic link
1
etc/rc.d/rc4.d/S92netfs
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../init.d/netfs
|
1
etc/rc.d/rc5.d/S92netfs
Symbolic link
1
etc/rc.d/rc5.d/S92netfs
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../init.d/netfs
|
1
etc/rc.d/rc6.d/K80netfs
Symbolic link
1
etc/rc.d/rc6.d/K80netfs
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../init.d/netfs
|
@ -1,6 +1,6 @@
|
|||||||
# GNU Makefile listing dependencies between services when services are
|
# GNU Makefile listing dependencies between services when services are
|
||||||
# started.
|
# started.
|
||||||
# Copyright (c) 2006-2009 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
# Copyright (c) 2006-2011 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||||
#
|
#
|
||||||
# The following services have already been activated at this point:
|
# The following services have already been activated at this point:
|
||||||
#
|
#
|
||||||
@ -15,20 +15,20 @@ consolekit : haldaemon
|
|||||||
cpufreqd : syslog acpid macbook-tools
|
cpufreqd : syslog acpid macbook-tools
|
||||||
crond : syslog
|
crond : syslog
|
||||||
cups : syslog messagebus
|
cups : syslog messagebus
|
||||||
dhcpd : network iptables
|
dhcpd : network NetworkManager iptables
|
||||||
drbd : network iptables
|
drbd : network NetworkManager iptables
|
||||||
fuse :
|
fuse :
|
||||||
gpm : syslog
|
gpm : syslog
|
||||||
haldaemon : messagebus acpid alsa
|
haldaemon : messagebus acpid alsa
|
||||||
heartbeat : drbd network iptables
|
heartbeat : drbd network NetworkManager iptables
|
||||||
httpd : network iptables
|
httpd : network NetworkManager iptables
|
||||||
ipsec : network iptables
|
ipsec : network NetworkManager iptables
|
||||||
iptables : network
|
iptables : network NetworkManager
|
||||||
ipvsadm : network iptables
|
ipvsadm : network NetworkManager iptables
|
||||||
ivman : haldaemon
|
ivman : haldaemon
|
||||||
laptop-mode :
|
laptop-mode :
|
||||||
lisa : network
|
lisa : network NetworkManager
|
||||||
lisa4 : network haldaemon
|
lisa4 : network NetworkManager haldaemon
|
||||||
logrotate :
|
logrotate :
|
||||||
macbook-tools :
|
macbook-tools :
|
||||||
mailman : mysql postfix
|
mailman : mysql postfix
|
||||||
@ -37,30 +37,31 @@ messagebus : syslog
|
|||||||
mrtg : snmpd
|
mrtg : snmpd
|
||||||
msysklogd : random
|
msysklogd : random
|
||||||
mysql : syslog
|
mysql : syslog
|
||||||
named : network iptables
|
named : network NetworkManager iptables
|
||||||
nessusd : network iptables
|
nessusd : network NetworkManager iptables
|
||||||
network : syslog
|
network : syslog
|
||||||
NetworkManager : syslog messagebus
|
NetworkManager : syslog messagebus
|
||||||
|
netfs : network NetworkManager samba nfs-lock
|
||||||
nfs-lock :
|
nfs-lock :
|
||||||
nscd : syslog
|
nscd : syslog
|
||||||
ntop : network iptables
|
ntop : network NetworkManager iptables
|
||||||
ntpd : network iptables
|
ntpd : network NetworkManager iptables
|
||||||
openldap : syslog
|
openldap : syslog
|
||||||
portmap :
|
portmap :
|
||||||
postfix : syslog mysql postgresql
|
postfix : syslog mysql postgresql
|
||||||
postgresql : syslog
|
postgresql : syslog
|
||||||
random :
|
random :
|
||||||
samba : network iptables cups
|
samba : network NetworkManager iptables cups
|
||||||
snmpd : network iptables
|
snmpd : network NetworkManager iptables
|
||||||
snort : network
|
snort : network NetworkManager
|
||||||
squid : network iptables
|
squid : network NetworkManager iptables
|
||||||
sshd : network iptables
|
sshd : network NetworkManager iptables
|
||||||
sysklogd : random
|
sysklogd : random
|
||||||
sysinit : syslog
|
sysinit : syslog
|
||||||
syslog : syslog-ng msysklogd sysklogd
|
syslog : syslog-ng msysklogd sysklogd
|
||||||
syslog-ng :
|
syslog-ng :
|
||||||
udev-post : messagebus
|
udev-post : messagebus
|
||||||
xinetd : network iptables
|
xinetd : network NetworkManager iptables
|
||||||
wine : syslog
|
wine : syslog
|
||||||
wicd : haldaemon
|
wicd : haldaemon
|
||||||
VirtualBox :
|
VirtualBox :
|
||||||
|
@ -3,43 +3,45 @@
|
|||||||
#
|
#
|
||||||
# rc[1-5].d dependencies
|
# rc[1-5].d dependencies
|
||||||
acpid : sendsignals
|
acpid : sendsignals
|
||||||
alsa : splash
|
alsa :
|
||||||
consolekit : splash
|
consolekit :
|
||||||
cpufreqd : sendsignals
|
cpufreqd : sendsignals
|
||||||
crond : splash
|
crond :
|
||||||
cups : splash
|
cups :
|
||||||
drbd : splash heartbeat
|
drbd : heartbeat
|
||||||
gpm : splash
|
gpm :
|
||||||
haldaemon : splash wicd
|
haldaemon : wicd
|
||||||
heartbeat : splash
|
heartbeat :
|
||||||
httpd : splash
|
httpd :
|
||||||
iptables : sendsignals
|
iptables : sendsignals
|
||||||
lisa : splash
|
lisa :
|
||||||
lisa4 : splash
|
lisa4 :
|
||||||
localnet : splash network
|
localnet : network NetworkManager
|
||||||
logrotate : splash
|
logrotate :
|
||||||
mountfs : splash sendsignals swap create_final_log
|
mountfs : sendsignals network NetworkManager swap create_final_log
|
||||||
mrtg : splash
|
mrtg :
|
||||||
mysql : splash
|
mysql :
|
||||||
named : splash
|
named :
|
||||||
nessusd : splash
|
nessusd :
|
||||||
network : splash mountfs vmware heartbeat drbd
|
network : netfs vmware heartbeat drbd
|
||||||
nscd : splash
|
NetworkManager : netfs vmware heatbeat drbd
|
||||||
ntpd : splash
|
netfs : samba
|
||||||
openldap : splash
|
nscd :
|
||||||
postgresql : splash
|
ntpd :
|
||||||
random : splash
|
openldap :
|
||||||
samba : splash
|
postgresql :
|
||||||
snort : splash
|
random :
|
||||||
|
samba :
|
||||||
|
snort :
|
||||||
splash :
|
splash :
|
||||||
sshd : splash
|
sshd :
|
||||||
swap : sendsignals
|
swap : sendsignals
|
||||||
udev : splash mountfs
|
udev : mountfs
|
||||||
virtualbox : splash
|
virtualbox :
|
||||||
vmware : splash
|
vmware :
|
||||||
wine : splash
|
wine :
|
||||||
xinetd : splash
|
xinetd :
|
||||||
wicd : splash
|
wicd :
|
||||||
# services to be started last
|
# services to be started last
|
||||||
sysklogd : $(filter-out sysklogd udev mountfs sendsignals create_final_log swap reboot halt,$(ALL_RUNLEVEL))
|
sysklogd : $(filter-out sysklogd udev mountfs sendsignals create_final_log swap reboot halt,$(ALL_RUNLEVEL))
|
||||||
sendsignals : $(filter-out sendsignals acpid iptables localnet network udev mountfs network cpufreqd swap reboot halt,$(ALL_RUNLEVEL))
|
sendsignals : $(filter-out sendsignals acpid iptables localnet network udev mountfs network cpufreqd swap reboot halt,$(ALL_RUNLEVEL))
|
||||||
|
Loading…
Reference in New Issue
Block a user