[Frugalware-git] kdetesting2: lvm2-2.02.81-2-i686

Miklos Vajna vmiklos at frugalware.org
Wed Jan 26 20:27:19 CET 2011


Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=kdetesting2.git;a=commitdiff;h=268122ab4ce8f39785f203e72618c2ef81fa4d55

commit 268122ab4ce8f39785f203e72618c2ef81fa4d55
Author: Miklos Vajna <vmiklos at frugalware.org>
Date:   Wed Jan 19 03:47:08 2011 +0100

lvm2-2.02.81-2-i686

- add systemd support

diff --git a/source/apps/lvm2/FrugalBuild b/source/apps/lvm2/FrugalBuild
index 6b14c11..d6cfe2b 100644
--- a/source/apps/lvm2/FrugalBuild
+++ b/source/apps/lvm2/FrugalBuild
@@ -3,7 +3,7 @@

pkgname=lvm2
pkgver=2.02.81
-pkgrel=1
+pkgrel=2
pkgdesc="Logical Volume Manager 2 utilities"
url="http://sources.redhat.com/lvm2/"
depends=('udev')
@@ -11,8 +11,8 @@ backup=(etc/lvm/lvm.conf)
groups=('apps')
archs=('i686' 'x86_64' 'ppc')
up2date="lynx -dump ftp://sources.redhat.com/pub/lvm2/|grep tgz$|sed -n 's/.*LVM2\.\(.*\)\.tgz/\1/;$ p'"
-source=(ftp://sources.redhat.com/pub/lvm2/LVM2.$pkgver.tgz rc.lvm README.Frugalware)
-signatures=($source.asc '' '')
+source=(ftp://sources.redhat.com/pub/lvm2/LVM2.$pkgver.tgz rc.lvm lvm.service README.Frugalware)
+signatures=($source.asc '' '' '')
Fconfopts="--enable-applib --enable-cmdlib --enable-pkgconfig $Fconfopts"

build()
@@ -25,6 +25,8 @@ build()
confdir="$Fdestdir/etc/lvm" libdir="$Fdestdir/lib" \
install install_device-mapper
Frcd2 lvm
+	Ffile /lib/systemd/system/lvm.service
+	Fmkdir /etc/systemd/system/sysinit.target.wants
Fdoc README.Frugalware
}

diff --git a/source/apps/lvm2/lvm.service b/source/apps/lvm2/lvm.service
new file mode 100644
index 0000000..4215d0e
--- /dev/null
+++ b/source/apps/lvm2/lvm.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=LVM activation
+DefaultDependencies=no
+After=udev-settle.service
+Before=local-fs.target
+ConditionPathExists=/sbin/vgchange
+
+[Service]
+ExecStart=/sbin/vgchange --sysinit -a y
+Type=oneshot
+
+[Install]
+WantedBy=sysinit.target
diff --git a/source/apps/lvm2/lvm2.install b/source/apps/lvm2/lvm2.install
index 8e841c2..a370e20 100644
--- a/source/apps/lvm2/lvm2.install
+++ b/source/apps/lvm2/lvm2.install
@@ -3,12 +3,30 @@ post_install()
cd /etc/rc.d/rcS.d
ln -sf ../rc.lvm S14rc.lvm
chkconfig --add rc.lvm
+	ln -s '/lib/systemd/system/lvm.service' '/etc/systemd/system/sysinit.target.wants/lvm.service'
+}
+
+post_upgrade()
+{
+	systemctl daemon-reload >/dev/null 2>&1
+	if [ `vercmp $2 2.02.81-2` -lt 0 ] ; then
+		if chkconfig rc.lvm; then
+			post_install
+		fi
+	fi
}

pre_remove()
{
rm /etc/rc.d/rcS.d/S14rc.lvm
chkconfig --del rc.lvm
+	rm -f '/etc/systemd/system/sysinit.target.wants/lvm.service'
+	systemctl stop lvm.service >/dev/null 2>&1
+}
+
+post_remove()
+{
+	systemctl daemon-reload >/dev/null 2>&1
}

op=$1


More information about the Frugalware-git mailing list