From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <sebastian@werner-productions.de>
X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on finch.gentoo.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_ADSP_NXDOMAIN,
	DMARC_MISSING,MAILING_LIST_MULTI autolearn=unavailable
	autolearn_force=no version=4.0.0
Received: from moutvdom00.kundenserver.de (moutvdom00.kundenserver.de [195.20.224.149])
	by chiba.3jane.net (Postfix) with ESMTP id E5B9D1A676
	for <gentoo-dev@gentoo.org>; Thu, 13 Dec 2001 11:47:05 -0600 (CST)
Received: from [195.20.224.204] (helo=mrvdom00.kundenserver.de)
	by moutvdom00.kundenserver.de with esmtp (Exim 2.12 #2)
	id 16EZws-0002Pb-00
	for gentoo-dev@gentoo.org; Thu, 13 Dec 2001 18:47:10 +0100
Received: from p5082af05.dip.t-dialin.net ([80.130.175.5])
	by mrvdom00.kundenserver.de with esmtp (Exim 2.12 #2)
	id 16EZws-0000k3-00
	for gentoo-dev@gentoo.org; Thu, 13 Dec 2001 18:47:10 +0100
From: Sebastian Werner <sebastian@werner-productions.de>
To: gentoo-dev@gentoo.org
Content-Type: multipart/mixed; boundary="=-08BuI/Gr8zoPmV701AYK"
X-Mailer: Evolution/1.0 (Preview Release)
Date: 13 Dec 2001 18:43:11 +0100
Message-Id: <1008265392.20651.0.camel@wp.smile>
Mime-Version: 1.0
Subject: [gentoo-dev] lvm-support
Sender: gentoo-dev-admin@gentoo.org
Errors-To: gentoo-dev-admin@gentoo.org
X-BeenThere: gentoo-dev@gentoo.org
X-Mailman-Version: 2.0.6
Precedence: bulk
Reply-To: gentoo-dev@gentoo.org
List-Help: <mailto:gentoo-dev-request@gentoo.org?subject=help>
List-Post: <mailto:gentoo-dev@gentoo.org>
List-Subscribe: <http://lists.gentoo.org/mailman/listinfo/gentoo-dev>,
	<mailto:gentoo-dev-request@gentoo.org?subject=subscribe>
List-Id: Developer discussion list <gentoo-dev.gentoo.org>
List-Unsubscribe: <http://lists.gentoo.org/mailman/listinfo/gentoo-dev>,
	<mailto:gentoo-dev-request@gentoo.org?subject=unsubscribe>
List-Archive: <http://lists.gentoo.org/pipermail/gentoo-dev/>
X-Archives-Salt: 9d8ae7a8-2767-4fc6-a9b4-c70e38554326
X-Archives-Hash: 4e6cc38f55580915f620857eb64726a7

--=-08BuI/Gr8zoPmV701AYK
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

OK,

i have add lvm support to the localmount and halt.sh scripts. You must
have the /etc/lvmtab to get it to work.

I want send diffs but i have overwritten the originals...

Sebastian Werner



--=-08BuI/Gr8zoPmV701AYK
Content-Disposition: attachment; filename=localmount
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=ISO-8859-15

#!/sbin/runscript

depend() {
	need checkfs
}

start() {
	if [ -r /etc/lvmtab ]; then
		ebegin "Initialisising logical volume manager (lvm)"
		vgchange -a y > /dev/null 2>&1
		eend $?
	fi

	# Mount local filesystems in /etc/fstab.
	ebegin "Mounting local filesystems"
	mount -at nonfs,noproc,noncpfs,nosmbfs,noshm =20
	eend $?=20
	if [ -z "`grep usbdevfs /proc/filesystems`" ]
	then
		modprobe usbcore
	fi
	if [ -n "`grep usbdevfs /proc/filesystems`" ] && [ -e /proc/bus/usb ] && [=
 ! -e /proc/bus/usb/devices ]=20
	then
		ebegin "Mounting USB device filesystem"
		mount -t usbdevfs usbdevfs /proc/bus/usb
		eend $?
	fi
	#swap on loopback devices, and other weirdnesses
	ebegin "Activating (possibly) more swap"
	/sbin/swapon -a >/dev/null 2>&1
	eend=09
	return
}


--=-08BuI/Gr8zoPmV701AYK
Content-Disposition: attachment; filename=halt.sh
Content-Transfer-Encoding: quoted-printable
Content-Type: text/x-sh; charset=ISO-8859-15

#we try to deactivate swap first because it seems to need devfsd running
#to work.  The TERM and KILL stuff will zap devfsd, so...

ebegin "Deactivating swap"
swapoff -a 1>&2
eend $?
ebegin "Sending all processes the TERM signal"
killall5 -15
eend $?
sleep 5
ebegin "Sending all processes the KILL signal"
killall5 -9
eend $?

# Write a reboot record to /var/log/wtmp before unmounting

halt -w 1>&2

#unmounting should use /proc/mounts and work with/without devfsd running

ebegin "Unmounting filesystems"
umount -v -a -r -t noproc,notmpfs > /dev/null 2>&1
if [ "$?" =3D "1" ]
then
	eend 1 "hmmmm..."
	ebegin "Trying to unmount again"
	umount -a -r -f=20
	eend $?
else
	eend 0
fi

if [ -d /proc/lvm ]; then
	ebegin "Shutdown logical volume manager (lvm)"
	vgchange -a n > /dev/null 2>&1
	eend $?
fi

#this is "just in case"
sync; sync

--=-08BuI/Gr8zoPmV701AYK--