diff options
author | Christian Zoffoli <xmerlin@gentoo.org> | 2008-11-21 23:31:44 +0000 |
---|---|---|
committer | Christian Zoffoli <xmerlin@gentoo.org> | 2008-11-21 23:31:44 +0000 |
commit | ac61413c95dba0770408d61f4028cdb47a4095ba (patch) | |
tree | ef2616a99ca03b8e153dc4e44ff65ff24347daa4 | |
parent | Bump geany to 0.15 for drac. Bug drac about bugs. (diff) | |
download | historical-ac61413c95dba0770408d61f4028cdb47a4095ba.tar.gz historical-ac61413c95dba0770408d61f4028cdb47a4095ba.tar.bz2 historical-ac61413c95dba0770408d61f4028cdb47a4095ba.zip |
Version bump, removed a broken version, new init.
Package-Manager: portage-2.1.4.4
-rw-r--r-- | sys-fs/clvm/ChangeLog | 13 | ||||
-rw-r--r-- | sys-fs/clvm/Manifest | 27 | ||||
-rw-r--r-- | sys-fs/clvm/clvm-2.02.39.ebuild (renamed from sys-fs/clvm/clvm-2.02.36.ebuild) | 22 | ||||
-rw-r--r-- | sys-fs/clvm/files/cluster-locking-built-in.patch | 100 | ||||
-rw-r--r-- | sys-fs/clvm/files/clvmd.confd | 3 | ||||
-rwxr-xr-x | sys-fs/clvm/files/clvmd.rc | 110 | ||||
-rwxr-xr-x | sys-fs/clvm/files/clvmd.rc-2.02.33-xm | 146 | ||||
-rw-r--r-- | sys-fs/clvm/files/lvm.confd (renamed from sys-fs/clvm/files/lvm.confd-2.02.28-r2) | 0 | ||||
-rw-r--r-- | sys-fs/clvm/files/lvm.rc (renamed from sys-fs/clvm/files/lvm.rc-2.02.28-r2) | 2 | ||||
-rwxr-xr-x | sys-fs/clvm/files/lvm2-start.sh | 8 | ||||
-rw-r--r-- | sys-fs/clvm/files/lvm2-start.sh-2.02.33-xm | 34 | ||||
-rwxr-xr-x | sys-fs/clvm/files/lvm2-stop.sh | 2 | ||||
-rwxr-xr-x | sys-fs/clvm/files/lvm2-stop.sh-2.02.33-xm | 61 |
13 files changed, 112 insertions, 416 deletions
diff --git a/sys-fs/clvm/ChangeLog b/sys-fs/clvm/ChangeLog index 2734873aa905..418893821758 100644 --- a/sys-fs/clvm/ChangeLog +++ b/sys-fs/clvm/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for sys-fs/clvm # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/clvm/ChangeLog,v 1.25 2008/11/14 09:10:43 xmerlin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/clvm/ChangeLog,v 1.26 2008/11/21 23:31:43 xmerlin Exp $ + +*clvm-2.02.39 (22 Nov 2008) + + 22 Nov 2008; Christian Zoffoli <xmerlin@gentoo.org> + -files/lvm.confd-2.02.28-r2, -files/lvm.rc-2.02.28-r2, + -files/clvmd.rc-2.02.33-xm, -files/cluster-locking-built-in.patch, + +files/clvmd.confd, files/clvmd.rc, +files/lvm.confd, +files/lvm.rc, + files/lvm2-start.sh, files/lvm2-stop.sh, -files/lvm2-start.sh-2.02.33-xm, + -files/lvm2-stop.sh-2.02.33-xm, -clvm-2.02.36.ebuild, + +clvm-2.02.39.ebuild: + Version bump, removed a broken version, new init. *clvm-2.02.36 (14 Nov 2008) diff --git a/sys-fs/clvm/Manifest b/sys-fs/clvm/Manifest index 7e3775d4f200..9a5709f22c56 100644 --- a/sys-fs/clvm/Manifest +++ b/sys-fs/clvm/Manifest @@ -1,24 +1,21 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -AUX cluster-locking-built-in.patch 3092 RMD160 bbdb31d10a94122fc823d8bab93d796cf689071c SHA1 6299d12ec1aa74a764a2c05dd0a94c6a76c34a48 SHA256 4cbfcc912af8a8227230954d3525b52d648883d4b606aedbb7cafbec418c8d7e -AUX clvmd.rc 3448 RMD160 1ce38c44e0c16bee29600dba577671af2267c4ab SHA1 6d9305412656ef106a8375aa2a57405fc7d5e571 SHA256 e19294cb6231a3eb20bfdea1d253c1bd7e3204b8d4248118209f09a5bd9c3339 -AUX clvmd.rc-2.02.33-xm 3645 RMD160 7d2645abd608ea3878ed7c7917d466ebd3e1f37b SHA1 e48747922abd16ad8f67678a48e6a4a1643ac97d SHA256 9a464510909483ddb65a1c5831cd89e400d9c704bcd7ff04160e1076f9ed878b +AUX clvmd.confd 96 RMD160 802b887daa72a542a8317d7237fd2ca1013721e1 SHA1 855859222b16c2cd022c739e4d1b5b7d71719fac SHA256 0ee3c43d35b676b51230c519ad8c59150092d9219f8e12698a51bf1f47c9edbf +AUX clvmd.rc 3770 RMD160 3a8a9debc1b0ed06d015752c0739e3fda864b90c SHA1 eb2e56b057f510c7bc37bc5a40743b155dbb8699 SHA256 e4890646dd7551e6abf44a25da3d96ddf821a84752fb38bd40a0b5f3c1439f0b AUX lvm.conf-2.02.33.patch 3136 RMD160 c0292c39db064f0a4151ffccdc441be2fa78f8cf SHA1 8dbcbf66a841cc8acd889e174095df9932813a3e SHA256 63a8c21186f47979cb628970dca12df2a9f319745488a4d8a1e01f238a7fc711 -AUX lvm.confd-2.02.28-r2 173 RMD160 cf554372fa11df056e3757e5139fad6c7606a696 SHA1 e8186ebb91d12247d0865285dc62346d1cbc207a SHA256 28370c089c39c248d7ded0960b8d8a9256bada44d44c22ce3cec87d512ef6844 -AUX lvm.rc-2.02.28-r2 639 RMD160 17eea9c06fe349e02e132177eab6e4ce92dd73ef SHA1 3317a158eed96d03c569aa1353dc65eab4bba167 SHA256 98988561a572c577e614ca11df8631829af5d6b3ebda467c79b29c8cd44d8f0c -AUX lvm2-start.sh 991 RMD160 ef2f8a7b53c51bf690371477efe5889c4bf1060f SHA1 62e9c2e14756e10ab0db209e9306a31b28ad4075 SHA256 093ff817ce902cb56279bcf6b59962323413831098eb4a4414d641ddbc93ef35 -AUX lvm2-start.sh-2.02.33-xm 1182 RMD160 e272346185782bdff09176a6ae74e1a5e381f433 SHA1 7d0e59f226dd181e48e6e9f23e23be8f9d5637b2 SHA256 353fea1fa16ade9768a0d20f36a23816eae55f6fe4600d75bb77c492d843332f -AUX lvm2-stop.sh 1941 RMD160 6fcb780e95f5434beee7897428847f6652c1f330 SHA1 8d2ff11e09a04594d339fd1f71dd8011b449b3b2 SHA256 e2d20df350495c1178180cda92b8c6059dba048aad319528aa979e19ad07e50f -AUX lvm2-stop.sh-2.02.33-xm 1952 RMD160 23e34c8d93ca24401d0045a6ca13fb6f4846ee72 SHA1 ccff4d9f744d83da862a11cae72e562ea9164fee SHA256 06521e5f9f88e44b4feedfcbf0179a8da6b74c321a754da0f62f300197707853 -DIST LVM2.2.02.36.tgz 568884 RMD160 dae1925160373c9f8e3c58954b394015c654c667 SHA1 29ddaf10a49868fb8d85afd21c8e7f6943846eae SHA256 359000abf276c65a4cab0ac682be3d0891130b75733a09543e340bce22486df7 -EBUILD clvm-2.02.36.ebuild 3642 RMD160 6a580f93e74ccf6c7e30bfa46584bd3c10c358a9 SHA1 80a639b405c496376350a78b30526806a597fe26 SHA256 febc12abe32e4598d0a3429948e3d199449077e266c507325792a316a1b466cb -MISC ChangeLog 4284 RMD160 45bdf4198e16ca412e9415373035da4f9bd869f0 SHA1 8d9d6000ae0eef6371ce3485ed880b1648ac9ac8 SHA256 3c6111b766beb407fa137e86933e71a42665da3179d048106cd20425731d18ec +AUX lvm.confd 173 RMD160 cf554372fa11df056e3757e5139fad6c7606a696 SHA1 e8186ebb91d12247d0865285dc62346d1cbc207a SHA256 28370c089c39c248d7ded0960b8d8a9256bada44d44c22ce3cec87d512ef6844 +AUX lvm.rc 628 RMD160 8a71c99d1e4676bc56f42893faf4e398d21709e8 SHA1 24a070e3a27fad3498a84b4f7b92a834d544e9a4 SHA256 2abdc3d061cdc8edeabaae591296426475d64a0839590c06aeb8a71b682dd81a +AUX lvm2-start.sh 1171 RMD160 6ab8a328e61316291fb0b3d924bd79af6b1c4f3f SHA1 b63584a727606fbd1cc12bf2256747f16211ca83 SHA256 f096f1931e16cc99e27fdfa7326681bcd48b073a94dd21120caf4508d584abe8 +AUX lvm2-stop.sh 1941 RMD160 8a0cd0b78d73a987cd996c91cc4dd34ad795d9f2 SHA1 50765535b0ceda005f588be5ca1768c570f3de17 SHA256 f4a78ced1e27fbf69704e9ec7731c57f282563ad9dccf1f7e01ffed34697f627 +DIST LVM2.2.02.39.tgz 578005 RMD160 8a6c0ce5d13e7e215a346bcfa3f2427803ab0a9d SHA1 0bc8a2c351f0ca0123e592bc3e808e39b0d03bbb SHA256 d07bbdda39307bd01e9a41eb50e265c72baed026abb6d4a4c452ba24e9f1cea2 +EBUILD clvm-2.02.39.ebuild 3652 RMD160 2159c5cd3b510f545f8b41f1bd15f0e486638029 SHA1 1e9bbf039573712a43fd0e144813d23b3c7679ff SHA256 940020b5ce201d42ece2e53c01c19b93fbd68f17e6e0f5e6ad4ee83713738e5b +MISC ChangeLog 4773 RMD160 abfec188c6e3f7ba8bb4f3d852aa383fbb134542 SHA1 d539400ef2188806b4df1e1bd8ca78086c391867 SHA256 eafaa8e39df4e92b93dd2282cce3786676e79d6aa4414be982b4b83b713e050f MISC metadata.xml 242 RMD160 bdee469b95fdc095ed18e6620d86fea03f57194d SHA1 36aca1c80fee8d2f302ef9d9e6422cd39f100b7d SHA256 b9e9b228fd97e685c563a2ab1e5fc9ed5524fb6b36e909229f76629a7229865e -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) -iEYEARECAAYFAkkdTskACgkQgMUyd/cdjWufxgCeJECmHtl4JDuqLuyhUBa7bsyD -UDUAoIt9l6/rUaSkcswBxTK7HeMIanQs -=EJUP +iEYEARECAAYFAkknUwkACgkQgMUyd/cdjWv2IACgkG5bQ3AgT7ANEhx6FLzvtuwr +qTwAn0i+b9krzrs/h2A0xhJQ6KGADK6n +=0UCc -----END PGP SIGNATURE----- diff --git a/sys-fs/clvm/clvm-2.02.36.ebuild b/sys-fs/clvm/clvm-2.02.39.ebuild index 46402551bff9..76941fb123ce 100644 --- a/sys-fs/clvm/clvm-2.02.36.ebuild +++ b/sys-fs/clvm/clvm-2.02.39.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/clvm/clvm-2.02.36.ebuild,v 1.1 2008/11/14 09:10:43 xmerlin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/clvm/clvm-2.02.39.ebuild,v 1.1 2008/11/21 23:31:43 xmerlin Exp $ inherit eutils multilib @@ -14,9 +14,9 @@ LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="readline static selinux" +IUSE="readline static selinux nolvmstatic" -DEPEND=">=sys-fs/device-mapper-1.02.24 +DEPEND=">=sys-fs/device-mapper-1.02.27 =sys-cluster/dlm-2* =sys-cluster/cman-2* " @@ -32,7 +32,7 @@ src_unpack() { cd "${S}" epatch "${FILESDIR}"/lvm.conf-2.02.33.patch || die - epatch "${FILESDIR}"/cluster-locking-built-in.patch || die + #epatch "${FILESDIR}"/cluster-locking-built-in.patch || die } src_compile() { @@ -87,6 +87,7 @@ src_compile() { src_install() { emake DESTDIR="${D}" install + # TODO: At some point in the future, we need to stop installing the static # as the /sbin/lvm name, and have both variants seperate. if use static; then @@ -105,11 +106,14 @@ src_install() { dodoc README VERSION WHATS_NEW doc/*.{conf,c,txt} insinto /lib/rcscripts/addons - newins "${FILESDIR}"/lvm2-start.sh-2.02.33-xm lvm-start.sh || die - newins "${FILESDIR}"/lvm2-stop.sh-2.02.33-xm lvm-stop.sh || die - newinitd "${FILESDIR}"/lvm.rc-2.02.28-r2 lvm || die - newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm || die - newinitd "${FILESDIR}"/clvmd.rc-2.02.33-xm clvmd || die + newins "${FILESDIR}"/lvm2-start.sh lvm-start.sh || die + newins "${FILESDIR}"/lvm2-stop.sh lvm-stop.sh || die + + newinitd "${FILESDIR}"/lvm.rc lvm || die + newconfd "${FILESDIR}"/lvm.confd lvm || die + + newinitd "${FILESDIR}"/clvmd.rc clvmd || die + newconfd "${FILESDIR}"/clvmd.confd clvmd || die elog "" elog "Rebuild your genkernel initramfs if you are using lvm" diff --git a/sys-fs/clvm/files/cluster-locking-built-in.patch b/sys-fs/clvm/files/cluster-locking-built-in.patch deleted file mode 100644 index 52fb82380ed7..000000000000 --- a/sys-fs/clvm/files/cluster-locking-built-in.patch +++ /dev/null @@ -1,100 +0,0 @@ ---- LVM2.2.02.12-old/scripts/lvmconf.sh 2006-09-20 18:36:47.000000000 +0100 -+++ LVM2.2.02.12/scripts/lvmconf.sh 2006-10-20 19:20:26.000000000 +0100 -@@ -36,7 +36,7 @@ function parse_args - while [ -n "$1" ]; do - case $1 in - --enable-cluster) -- LOCKING_TYPE=2 -+ LOCKING_TYPE=3 - shift - ;; - --disable-cluster) -@@ -94,15 +94,13 @@ function validate_args - - if [ -n "$LOCKINGLIBDIR" ]; then - -- [ -z "$LOCKINGLIB" ] && LOCKINGLIB="liblvm2clusterlock.so" -- - if [ "${LOCKINGLIBDIR:0:1}" != "/" ] - then - echo "Prefix must be an absolute path name (starting with a /)" - exit 12 - fi - -- if [ ! -f "$LOCKINGLIBDIR/$LOCKINGLIB" ] -+ if [ -n "$LOCKINGLIB" ] && [ ! -f "$LOCKINGLIBDIR/$LOCKINGLIB" ] - then - echo "$LOCKINGLIBDIR/$LOCKINGLIB does not exist, did you do a \"make install\" ?" - exit 11 -@@ -170,13 +168,29 @@ then - if [ -z "$LOCKING_TYPE" ]; then - LOCKING_TYPE=1 - fi -- if [ "$LOCKING_TYPE" = "2" ]; then -+ if [ "$LOCKING_TYPE" = "3" ] || [ "$LOCKING_TYPE" = "2" ]; then - cat $CONFIGFILE - <<EOF > $TMPFILE - global { - # Enable locking for cluster LVM - locking_type = $LOCKING_TYPE - library_dir = "$LOCKINGLIBDIR" -+EOF -+ if [ $? != 0 ] -+ then -+ echo "failed to create temporary config file, $CONFIGFILE not updated" -+ exit 14 -+ fi -+ if [ -n "$LOCKINGLIB" ]; then -+ cat - <<EOF >> $TMPFILE - locking_library = "$LOCKINGLIB" -+EOF -+ if [ $? != 0 ] -+ then -+ echo "failed to create temporary config file, $CONFIGFILE not updated" -+ exit 16 -+ fi -+ fi -+ cat - <<EOF >> $TMPFILE - } - EOF - fi # if we aren't setting cluster locking, we don't need to create a global section -@@ -184,7 +198,7 @@ EOF - if [ $? != 0 ] - then - echo "failed to create temporary config file, $CONFIGFILE not updated" -- exit 14 -+ exit 17 - fi - else - # -@@ -208,8 +222,10 @@ else - else - SEDCMD="${SEDCMD}\n/global[[:blank:]]*{/a\ \ \ \ library_dir = \"$LOCKINGLIBDIR\"" - fi -+ fi - -- if [ "$have_library" = "0" ] -+ if [ -n "$LOCKINGLIB" ]; then -+ if [ "$have_library" = "0" ] - then - SEDCMD="${SEDCMD}\ns/^[[:blank:]]*locking_library[[:blank:]]*=.*/\ \ \ \ locking_library = \"$LOCKINGLIB\"/g" - else -@@ -217,19 +233,6 @@ else - fi - fi - -- if [ "$LOCKING_TYPE" = "1" ]; then -- # if we're not using cluster locking, remove the library dir and locking library name -- if [ "$have_dir" = "0" ] -- then -- SEDCMD="${SEDCMD}\n/^[[:blank:]]*library_dir[[:blank:]]*=.*/d" -- fi -- -- if [ "$have_library" = "0" ] -- then -- SEDCMD="${SEDCMD}\n/^[[:blank:]]*locking_library[[:blank:]]*=.*/d" -- fi -- fi -- - echo -e $SEDCMD > $SCRIPTFILE - sed <$CONFIGFILE >$TMPFILE -f $SCRIPTFILE - if [ $? != 0 ] diff --git a/sys-fs/clvm/files/clvmd.confd b/sys-fs/clvm/files/clvmd.confd new file mode 100644 index 000000000000..0bef40312b7a --- /dev/null +++ b/sys-fs/clvm/files/clvmd.confd @@ -0,0 +1,3 @@ +# CLVMD_CLUSTER_TIMEOUT -- amount of time to wait for cluster quorum. + +CLVMD_CLUSTER_TIMEOUT=30 diff --git a/sys-fs/clvm/files/clvmd.rc b/sys-fs/clvm/files/clvmd.rc index 4222bbb99b0b..be51784a5f17 100755 --- a/sys-fs/clvm/files/clvmd.rc +++ b/sys-fs/clvm/files/clvmd.rc @@ -1,18 +1,21 @@ #!/sbin/runscript # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/clvm/files/clvmd.rc,v 1.4 2008/03/29 15:42:28 xmerlin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/clvm/files/clvmd.rc,v 1.5 2008/11/21 23:31:44 xmerlin Exp $ + +[ -x /usr/sbin/clvmd ] && CLVMD_BIN="/usr/sbin/clvmd" || CLVMD_BIN="/sbin/clvmd" + +[ -z "$CLVMD_CLUSTER_TIMEOUT" ] && CLVMD_CLUSTER_TIMEOUT=30 -CLVM_BIN="/sbin/clvmd" VGCHANGE="/sbin/vgchange" VGSCAN="/sbin/vgscan" VGDISPLAY="/sbin/vgdisplay" +CLVMD_PIDFILE="/var/run/clvmd.pid" depend() { use dns logger use net need cman - before gfs } load_modules() { @@ -67,54 +70,39 @@ umount_gfs_filesystems() { fi } -start() { +start_volumes() { + ebegin "Scanning LVM volumes" + $VGSCAN &>/dev/null - local module=$(awk '$1 == "dm_mod" { print $1 }' /proc/{modules,devices}) + ret=$? - if [ -z "${module}" ]; then - load_modules "dm-mod" - sleep 1s - fi - - ebegin "Starting clvmd" - start-stop-daemon --start --quiet --exec ${CLVM_BIN} - eend $? - - ebegin "Scanning LVM volumes" - ${VGSCAN} &>/dev/null - eend $? - - #if [ "$?" -eq 0 ] && [ -x /sbin/vgchange ] && [ -f /etc/lvmtab -o -d /etc/lvm ] - #then - # ebegin "Setting up the Logical Volume Manager" - # /sbin/vgchange -aly >/dev/null - # eend $? "Failed to setup the LVM" - #fi - - if [ -n "$LVM_VGS" ] + if [ "$ret" -eq 5 ] then - for vg in $LVM_VGS - do - ebegin " Activating VG: ${vg} " - $VGCHANGE -ayl ${vg} >/dev/null - eend $? - done + einfo " ...initialization delayed." + eend 0 else - clustervgs=`$VGDISPLAY 2> /dev/null | awk 'BEGIN {RS="VG Name"} {if (/Clustered/) print $1;}'` - for vg in $clustervgs; do - ebegin " Activating Clustered VG: ${vg} " - $VGCHANGE -ayl ${vg} >/dev/null - eend $? - done + eend 0 + + if [ -n "$LVM_VGS" ] + then + for vg in $LVM_VGS + do + ebegin " Activating VG: ${vg} " + $VGCHANGE -ayl ${vg} >/dev/null + eend $? + done + else + clustervgs=`$VGDISPLAY 2> /dev/null | awk 'BEGIN {RS="VG Name"} {if (/Clustered/) print $1;}'` + for vg in $clustervgs; do + ebegin " Activating Clustered VG: ${vg} " + $VGCHANGE -ayl ${vg} >/dev/null + eend $? + done + fi fi } -stop() { - # umount GFS filesystems - umount_gfs_filesystems - - sleep 2 - +stop_volumes() { if [ -n "$LVM_VGS" ] then for vg in $LVM_VGS @@ -132,10 +120,40 @@ stop() { eend $? done fi +} + + +start() { + local module=$(awk '$1 == "dm_mod" { print $1 }' /proc/{modules,devices}) + + if [ -z "${module}" ]; then + load_modules "dm-mod" + sleep 1s + fi + + ebegin "Starting clvmd ($CLVMD_CLUSTER_TIMEOUT seconds)" + + start-stop-daemon --start --quiet --exec ${CLVMD_BIN} -- -T ${CLVMD_CLUSTER_TIMEOUT} + eend $? + + #start_volumes +} + +stop() { + + # umount GFS filesystems + umount_gfs_filesystems + + #stop_volumes ebegin "Stopping clvmd" - #start-stop-daemon --stop -s 9 --quiet --exec ${CLVM_BIN} --name clvmd - killall -TERM ${CLVM_BIN} >/dev/null + #start-stop-daemon --stop -s TERM --quiet --exec ${CLVMD_BIN} --name clvmd + killall -TERM ${CLVMD_BIN} >/dev/null eend $? + #local module=$(awk '$1 == "dm_mod" { print $1 }' /proc/modules) + + #if [[ "$?" -eq 0 && ! -z "${module}" ]]; then + # unload_modules "dm-mod" + #fi } diff --git a/sys-fs/clvm/files/clvmd.rc-2.02.33-xm b/sys-fs/clvm/files/clvmd.rc-2.02.33-xm deleted file mode 100755 index 6e97248c1ae5..000000000000 --- a/sys-fs/clvm/files/clvmd.rc-2.02.33-xm +++ /dev/null @@ -1,146 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/clvm/files/clvmd.rc-2.02.33-xm,v 1.1 2008/03/17 19:15:53 xmerlin Exp $ - -CLVM_BIN="/sbin/clvmd" -VGCHANGE="/sbin/vgchange" -VGSCAN="/sbin/vgscan" -VGDISPLAY="/sbin/vgdisplay" - -depend() { - use dns logger - use net - need cman -} - -load_modules() { - local module modules - modules=$1 - - for module in ${modules}; do - ebegin "Loading ${module} kernel module" - modprobe ${module} - eend $? "Failed to load ${module} kernel module" - done -} - -unload_modules() { - local module modules - modules=$1 - - for module in ${modules}; do - ebegin "Unloading ${module} kernel module" - modprobe -r ${module} - eend $? "Failed to unload ${module} kernel module" - done -} - -umount_gfs_filesystems() { - local sig retry - local remaining="$(awk '$3 == "gfs" { print $2 }' /proc/mounts | sort -r)" - - if [ -n "${remaining}" ] - then - sig= - retry=3 - while [ -n "${remaining}" -a "${retry}" -gt 0 ] - do - if [ "${retry}" -lt 3 ] - then - ebegin "Unmounting GFS filesystems (retry)" - umount ${remaining} &>/dev/null - eend $? "Failed to unmount GFS filesystems this retry" - else - ebegin "Unmounting GFS filesystems" - umount ${remaining} &>/dev/null - eend $? "Failed to unmount GFS filesystems" - fi - remaining="$(awk '$3 == "gfs" { print $2 }' /proc/mounts | sort -r)" - [ -z "${remaining}" ] && break - /bin/fuser -k -m ${sig} ${remaining} &>/dev/null - sleep 5 - retry=$((${retry} -1)) - sig=-9 - done - fi -} - -start() { - - local module=$(awk '$1 == "dm_mod" { print $1 }' /proc/{modules,devices}) - - if [ -z "${module}" ]; then - load_modules "dm-mod" - sleep 1s - fi - - ebegin "Starting clvmd" - start-stop-daemon --start --quiet --exec ${CLVM_BIN} - eend $? - - ebegin "Scanning LVM volumes" - ${VGSCAN} &>/dev/null - eend $? - - #if [ "$?" -eq 0 ] && [ -x /sbin/vgchange ] && [ -f /etc/lvmtab -o -d /etc/lvm ] - #then - # ebegin "Setting up the Logical Volume Manager" - # /sbin/vgchange -aly >/dev/null - # eend $? "Failed to setup the LVM" - #fi - - if [ -n "$LVM_VGS" ] - then - for vg in $LVM_VGS - do - ebegin " Activating VG: ${vg} " - $VGCHANGE -ayl ${vg} >/dev/null - eend $? - done - else - clustervgs=`$VGDISPLAY 2> /dev/null | awk 'BEGIN {RS="VG Name"} {if (/Clustered/) print $1;}'` - for vg in $clustervgs; do - ebegin " Activating Clustered VG: ${vg} " - $VGCHANGE -ayl ${vg} >/dev/null - eend $? - done - fi -} - -stop() { - - # umount GFS filesystems - #umount_gfs_filesystems - - #for rtrn in 0 - #do - if [ -n "$LVM_VGS" ] - then - for vg in $LVM_VGS - do - ebegin " Shutting Down VG: ${vg} " - $VGCHANGE -anl ${vg} >/dev/null - eend $? - done - else - # Deactivate only clustered volumes - clustervgs=`$VGDISPLAY 2> /dev/null | awk 'BEGIN {RS="VG Name"} {if (/Clustered/) print $1;}'` - for vg in $clustervgs; do - ebegin " Shutting Down Clustered VG: ${vg} " - $VGCHANGE -anl ${vg} >/dev/null - eend $? - done - fi - - ebegin "Stopping clvmd" - #start-stop-daemon --stop -s 9 --quiet --exec ${CLVM_BIN} --name clvmd - killall -TERM ${CLVM_BIN} >/dev/null - eend $? - - local module=$(awk '$1 == "dm_mod" { print $1 }' /proc/modules) - - if [[ "$?" -eq 0 && ! -z "${module}" ]]; then - unload_modules "dm-mod" - fi -} diff --git a/sys-fs/clvm/files/lvm.confd-2.02.28-r2 b/sys-fs/clvm/files/lvm.confd index 2fbd8668c376..2fbd8668c376 100644 --- a/sys-fs/clvm/files/lvm.confd-2.02.28-r2 +++ b/sys-fs/clvm/files/lvm.confd diff --git a/sys-fs/clvm/files/lvm.rc-2.02.28-r2 b/sys-fs/clvm/files/lvm.rc index 2f64a7f07b30..bef24adb32f9 100644 --- a/sys-fs/clvm/files/lvm.rc-2.02.28-r2 +++ b/sys-fs/clvm/files/lvm.rc @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/clvm/files/lvm.rc-2.02.28-r2,v 1.1 2008/03/17 19:15:53 xmerlin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/clvm/files/lvm.rc,v 1.1 2008/11/21 23:31:44 xmerlin Exp $ depend() { if [ -e /lib/librc.so ]; then diff --git a/sys-fs/clvm/files/lvm2-start.sh b/sys-fs/clvm/files/lvm2-start.sh index d367a203cf8b..27ef40f26702 100755 --- a/sys-fs/clvm/files/lvm2-start.sh +++ b/sys-fs/clvm/files/lvm2-start.sh @@ -1,5 +1,5 @@ # /lib/rcscripts/addons/lvm2-start.sh -# $Header: /var/cvsroot/gentoo-x86/sys-fs/clvm/files/lvm2-start.sh,v 1.3 2006/07/13 08:23:55 xmerlin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/clvm/files/lvm2-start.sh,v 1.4 2008/11/21 23:31:44 xmerlin Exp $ # LVM support for /usr, /home, /opt .... # This should be done *before* checking local @@ -21,7 +21,11 @@ if [[ -z ${CDBOOT} ]] && [[ -x /sbin/vgscan ]] ; then if [[ $? == 0 ]] && [[ -x /sbin/vgchange ]] && \ [[ -f /etc/lvmtab || -d /etc/lvm ]] then - /sbin/vgchange --ignorelockingfailure -a y >/dev/null + noclustervgs=`/sbin/vgdisplay 2> /dev/null | \ + awk 'BEGIN {RS="VG Name"} {if (!/Clustered/) { if ($1 != "---") print $1; } }'` + for vg in $noclustervgs; do + /sbin/vgchange --ignorelockingfailure -a y ${vg} >/dev/null + done fi eend $? "Failed to setup the LVM" fi diff --git a/sys-fs/clvm/files/lvm2-start.sh-2.02.33-xm b/sys-fs/clvm/files/lvm2-start.sh-2.02.33-xm deleted file mode 100644 index df07fa74406d..000000000000 --- a/sys-fs/clvm/files/lvm2-start.sh-2.02.33-xm +++ /dev/null @@ -1,34 +0,0 @@ -# /lib/rcscripts/addons/lvm2-start.sh -# $Header: /var/cvsroot/gentoo-x86/sys-fs/clvm/files/lvm2-start.sh-2.02.33-xm,v 1.1 2008/03/17 19:15:53 xmerlin Exp $ - -# LVM support for /usr, /home, /opt .... -# This should be done *before* checking local -# volumes, or they never get checked. - -# NOTE: Add needed modules for LVM or RAID, etc -# to /etc/modules.autoload if needed -if [[ -z ${CDBOOT} ]] && [[ -x /sbin/vgscan ]] ; then - if [[ -e /proc/modules ]] && \ - ! grep -qs 'device-mapper' /proc/{devices,misc} - then - modprobe dm-mod &>/dev/null - fi - - if [[ -d /proc/lvm ]] || grep -qs 'device-mapper' /proc/{devices,misc} ; then - ebegin "Setting up the Logical Volume Manager" - #still echo stderr for debugging - /sbin/vgscan --mknodes --ignorelockingfailure >/dev/null - if [[ $? == 0 ]] && [[ -x /sbin/vgchange ]] && \ - [[ -f /etc/lvmtab || -d /etc/lvm ]] - then - noclustervgs=`/sbin/vgdisplay 2> /dev/null | \ - awk 'BEGIN {RS="VG Name"} {if (!/Clustered/) { if ($1 != "---") print $1; } }'` - for vg in $noclustervgs; do - /sbin/vgchange --ignorelockingfailure -a y ${vg} >/dev/null - done - fi - eend $? "Failed to setup the LVM" - fi -fi - -# vim:ts=4 diff --git a/sys-fs/clvm/files/lvm2-stop.sh b/sys-fs/clvm/files/lvm2-stop.sh index 252c52d3b32b..c7f979c1d3a1 100755 --- a/sys-fs/clvm/files/lvm2-stop.sh +++ b/sys-fs/clvm/files/lvm2-stop.sh @@ -1,5 +1,5 @@ # /lib/rcscripts/addons/lvm2-stop.sh -# $Header: /var/cvsroot/gentoo-x86/sys-fs/clvm/files/lvm2-stop.sh,v 1.3 2006/07/13 08:23:55 xmerlin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/clvm/files/lvm2-stop.sh,v 1.4 2008/11/21 23:31:44 xmerlin Exp $ # Stop LVM2 if [ -x /sbin/vgchange ] && \ diff --git a/sys-fs/clvm/files/lvm2-stop.sh-2.02.33-xm b/sys-fs/clvm/files/lvm2-stop.sh-2.02.33-xm deleted file mode 100755 index fa69533d51ae..000000000000 --- a/sys-fs/clvm/files/lvm2-stop.sh-2.02.33-xm +++ /dev/null @@ -1,61 +0,0 @@ -# /lib/rcscripts/addons/lvm2-stop.sh -# $Header: /var/cvsroot/gentoo-x86/sys-fs/clvm/files/lvm2-stop.sh-2.02.33-xm,v 1.1 2008/03/17 19:15:53 xmerlin Exp $ - -# Stop LVM2 -if [ -x /sbin/vgchange ] && \ - [ -x /sbin/lvdisplay ] && \ - [ -x /sbin/vgdisplay ] && \ - [ -x /sbin/lvchange ] && \ - [ -f /etc/lvmtab -o -d /etc/lvm ] && \ - [ -d /proc/lvm -o "`grep device-mapper /proc/misc 2>/dev/null`" ] -then - einfo "Shutting down the Logical Volume Manager" - # If these commands fail it is not currently an issue - # as the system is going down anyway based on the current LVM - # functionality as described in this forum thread - #https://www.redhat.com/archives/linux-lvm/2001-May/msg00523.html - - LOGICAL_VOLUMES=`lvdisplay |grep "LV Name"|sed -e 's/.*LV Name\s*\(.*\)/\1/'|sort` - VOLUME_GROUPS=`vgdisplay |grep "VG Name"|sed -e 's/.*VG Name\s*\(.*\)/\1/'|sort` - for x in ${LOGICAL_VOLUMES} - do - LV_IS_ACTIVE=`lvdisplay ${x}|grep "# open"|awk '{print $3}'` - if [ "${LV_IS_ACTIVE}" = 0 ] - then - ebegin " Shutting Down logical volume: ${x} " - lvchange -an --ignorelockingfailure -P ${x} >/dev/null - eend $? - fi - done - - for x in ${VOLUME_GROUPS} - do - VG_HAS_ACTIVE_LV=`vgdisplay ${x}|grep "Open LV"|sed -e 's/.*Open LV\s*\(.*\)/\1/'` - if [ "${VG_HAS_ACTIVE_LV}" = 0 ] - then - ebegin " Shutting Down volume group: ${x} " - vgchange -an --ignorelockingfailure -P ${x} >/dev/null - eend - fi - done - - for x in ${LOGICAL_VOLUMES} - do - LV_IS_ACTIVE=`lvdisplay ${x}|grep "# open"|sed -e 's/.*# open\s*\(.*\)/\1/'` - if [ "${LV_IS_ACTIVE}" = 1 ] - then - - ROOT_DEVICE=`mount|grep " / "|awk '{print $1}'` - MOUNTED_DEVICE=${x} - [ -L ${ROOT_DEVICE} ] && ROOT_DEVICE="`/bin/readlink ${ROOT_DEVICE}`" - [ -L ${x} ] && MOUNTED_DEVICE="`/bin/readlink ${x}`" - if [ ! ${ROOT_DEVICE} = ${MOUNTED_DEVICE} ] - then - ewarn " Unable to shutdown: ${x} " - fi - fi - done - einfo "Finished Shutting down the Logical Volume Manager" -fi - -# vim:ts=4 |