diff options
author | Christian Zoffoli <xmerlin@gentoo.org> | 2005-03-23 14:39:02 +0000 |
---|---|---|
committer | Christian Zoffoli <xmerlin@gentoo.org> | 2005-03-23 14:39:02 +0000 |
commit | 1ddcd8b39ccb25a08602b4760cd560d7834b1646 (patch) | |
tree | f5c9119bcd4672c9194de4a33bfdc06a0d2f8417 /sys-cluster/dlm/files | |
parent | added gfs filesystems umount support in init (fs mounted by hand) (diff) | |
download | gentoo-2-1ddcd8b39ccb25a08602b4760cd560d7834b1646.tar.gz gentoo-2-1ddcd8b39ccb25a08602b4760cd560d7834b1646.tar.bz2 gentoo-2-1ddcd8b39ccb25a08602b4760cd560d7834b1646.zip |
added lock_dlm module unload in init
(Portage version: 2.0.51.19)
Diffstat (limited to 'sys-cluster/dlm/files')
-rwxr-xr-x | sys-cluster/dlm/files/dlm.rc | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/sys-cluster/dlm/files/dlm.rc b/sys-cluster/dlm/files/dlm.rc index 620b4fe9b58b..c40a3f886af4 100755 --- a/sys-cluster/dlm/files/dlm.rc +++ b/sys-cluster/dlm/files/dlm.rc @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/dlm/files/dlm.rc,v 1.1 2005/03/22 13:39:42 xmerlin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/dlm/files/dlm.rc,v 1.2 2005/03/23 14:39:02 xmerlin Exp $ depend() { use net @@ -16,8 +16,28 @@ start() { } stop() { - ebegin "Removing dlm module" - modprobe -r dlm &>/dev/null - eend $? + + local module modules + + if [ -d /proc/cluster/lock_dlm ]; then + modules="${modules} lock_dlm" + fi + if [ -d /proc/cluster/dlm_dir ]; then + modules="${modules} dlm" + fi + + local module + for module in ${modules}; do + ebegin "Unloading ${module} kernel module" + modprobe -r ${module} + + if [ "$?" -ne 0 ] + then + ewend 1 "Failed to unload ${module} kernel module" + else + eend 0 + fi + done + } |