Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 4151 | Differences between
and this patch

Collapse All | Expand All

(-)/etc/init.d/halt.sh (-15 / +37 lines)
Lines 2-21 Link Here
2
# Distributed under the terms of the GNU General Public License, v2 or later
2
# Distributed under the terms of the GNU General Public License, v2 or later
3
# $Header: /home/cvsroot/gentoo-src/rc-scripts/init.d/halt.sh,v 1.14 2002/03/23 08:14:40 azarah Exp $
3
# $Header: /home/cvsroot/gentoo-src/rc-scripts/init.d/halt.sh,v 1.14 2002/03/23 08:14:40 azarah Exp $
4
4
5
if checkserver
6
then 
7
	#we try to deactivate swap on the server 
8
	# first because it seems to need devfsd running
9
	# to work.  The TERM and KILL stuff will zap devfsd, so...
5
10
6
#we try to deactivate swap first because it seems to need devfsd running
11
	ebegin "Deactivating swap"
7
#to work.  The TERM and KILL stuff will zap devfsd, so...
12
	swapoff -a &>/dev/null
8
13
	eend $?
9
ebegin "Deactivating swap"
10
swapoff -a &>/dev/null
11
eend $?
12
14
13
#we need to properly terminate devfsd to save the permissions
15
	#we need to properly terminate devfsd to save the permissions
14
if [ "$(ps -A |grep devfsd)" ]
16
	if [ "$(ps -A |grep devfsd)" ]
15
then
17
	then
16
	ebegin "Stopping devfsd"
18
	ebegin "Stopping devfsd"
17
	killall -15 devfsd &>/dev/null
19
	killall -15 devfsd &>/dev/null
18
	eend $?
20
	eend $?
21
	fi
19
fi
22
fi
20
23
21
ebegin "Sending all processes the TERM signal"
24
ebegin "Sending all processes the TERM signal"
Lines 92-104 Link Here
92
	eend $? "Failed to shut LVM down"
95
	eend $? "Failed to shut LVM down"
93
fi
96
fi
94
97
95
ebegin "Remounting remaining filesystems readonly"
98
if checkserver
96
#get better results with a sync and sleep
97
sync;sync
98
sleep 2
99
umount -a -r -n -t nodevfs,noproc,notmpfs &>/dev/null
100
if [ "$?" -ne 0 ]
101
then
99
then
100
	ebegin "Remounting remaining filesystems readonly"
101
	#get better results with a sync and sleep
102
	sync;sync
103
	sleep 2
104
	umount -a -r -n -t nodevfs,noproc,notmpfs &>/dev/null
105
	if [ "$?" -ne 0 ]
106
	then
102
	killall5 -9  &>/dev/null
107
	killall5 -9  &>/dev/null
103
	umount -a -r -n -l -d -f -t nodevfs,noproc &>/dev/null
108
	umount -a -r -n -l -d -f -t nodevfs,noproc &>/dev/null
104
	if [ "$?" -ne 0 ]
109
	if [ "$?" -ne 0 ]
Lines 109-115 Link Here
109
	else
114
	else
110
		eend 0
115
		eend 0
111
	fi
116
	fi
117
	else
118
		eend 0
119
	fi
112
else
120
else
121
	ebegin "Remounting remaining filesystems readonly"
122
	#get better results with a sync and sleep
123
	sync;sync
124
	sleep 2
125
	umount -a -r -n -t nodevfs,noproc,notmpfs &>/dev/null
126
	if [ "$?" -ne 0 ]
127
	then
128
		killall5 -9  &>/dev/null
129
		umount -a -r -n -l -d -f -t nodevfs,noproc &>/dev/null
130
		if [ "$?" -ne 0 ]
131
		then
132
			sync; sync
133
		fi
134
	fi
113
	eend 0
135
	eend 0
114
fi
136
fi
115
137

Return to bug 4151