forked from ports/contrib
lvm2: update patch to rc files (thanks denis yantarev)
add readme and patch auto add/remove renamed and updated patch rc.diff -> rc.diff
This commit is contained in:
parent
0c138243b5
commit
e219f69baa
27
lvm2/README
Normal file
27
lvm2/README
Normal file
@ -0,0 +1,27 @@
|
||||
REQUIREMENTS:
|
||||
|
||||
Patched core/rc package.
|
||||
|
||||
PRECAUTION:
|
||||
|
||||
Don't forget to run install scripts or patch rc manually
|
||||
with:
|
||||
|
||||
# patch -p 1 lvm2-rc.patch
|
||||
|
||||
PRE-INSTALL:
|
||||
|
||||
POST-INSTALL:
|
||||
|
||||
This patches rc scripts for LVM2 support.
|
||||
|
||||
PRE-REMOVE:
|
||||
|
||||
This reverses the LVM2 rc scripts patch.
|
||||
|
||||
POST-REMOVE:
|
||||
|
||||
NOTES:
|
||||
|
||||
post-install and pre-remove will only patch if there is
|
||||
no errors on a patch dry run.
|
29
lvm2/lvm2-rc.patch
Normal file
29
lvm2/lvm2-rc.patch
Normal file
@ -0,0 +1,29 @@
|
||||
diff -pruN pkg.orig/etc/rc pkg/etc/rc
|
||||
--- pkg.orig/etc/rc 2008-04-29 10:01:50.996260068 +1000
|
||||
+++ pkg/etc/rc 2008-04-29 10:02:17.184261912 +1000
|
||||
@@ -13,6 +13,13 @@ echo "The system is coming up. Please w
|
||||
/bin/mount -n -t sysfs none /sys
|
||||
/sbin/start_udev
|
||||
|
||||
+# Create device-mapper device nodes
|
||||
+/sbin/dmsetup mknodes
|
||||
+
|
||||
+# Scan for LVM volume groups
|
||||
+/sbin/vgscan --ignorelockingfailure
|
||||
+/sbin/vgchange --ignorelockingfailure -a y
|
||||
+
|
||||
# Mount root read-only
|
||||
/bin/mount -n -o remount,ro /
|
||||
|
||||
diff -pruN pkg.orig/etc/rc.shutdown pkg/etc/rc.shutdown
|
||||
--- pkg.orig/etc/rc.shutdown 2008-04-29 10:01:50.996260068 +1000
|
||||
+++ pkg/etc/rc.shutdown 2008-04-29 10:02:37.018264223 +1000
|
||||
@@ -43,6 +43,8 @@ fi
|
||||
/sbin/swapoff -a
|
||||
|
||||
# Unmount file systems
|
||||
+/bin/umount -a -r -t nosysfs,noproc
|
||||
+/sbin/vgchange --ignorelockingfailure -a n
|
||||
/bin/umount -a -r
|
||||
|
||||
# Remount root filesystem read-only
|
11
lvm2/post-install
Executable file
11
lvm2/post-install
Executable file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# dry run test
|
||||
/usr/bin/patch --dry-run -f -p 1 -i lvm2-rc.patch > /dev/null
|
||||
|
||||
# patch if no errors
|
||||
if [ $? = 0 ]; then
|
||||
/usr/bin/patch -p 1 -i lvm2-rc.patch
|
||||
fi
|
||||
|
||||
# End of file
|
11
lvm2/pre-remove
Executable file
11
lvm2/pre-remove
Executable file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# dry run test
|
||||
/usr/bin/patch --dry-run -f -R -p 1 -i lvm2-rc.patch > /dev/null
|
||||
|
||||
# reverse patch if no errors
|
||||
if [ $? = 0 ]; then
|
||||
/usr/bin/patch -R -p 1 -i lvm2-rc.patch
|
||||
fi
|
||||
|
||||
# End of file
|
26
lvm2/rc.diff
26
lvm2/rc.diff
@ -1,26 +0,0 @@
|
||||
--- /etc/rc.orig
|
||||
+++ /etc/rc
|
||||
@@ -13,6 +13,13 @@
|
||||
/bin/mount -n -t sysfs none /sys
|
||||
/sbin/start_udev
|
||||
|
||||
+# Create device-mapper device nodes
|
||||
+/sbin/dmsetup mknodes
|
||||
+
|
||||
+# Scan for LVM volume groups
|
||||
+/sbin/vgscan --ignorelockingfailure
|
||||
+/sbin/vgchange --ignorelockingfailure -a y
|
||||
+
|
||||
# Mount root read-only
|
||||
/bin/mount -n -o remount,ro /
|
||||
|
||||
--- /etc/rc.shutdown.orig
|
||||
+++ /etc/rc.shutdown
|
||||
@@ -44,6 +44,7 @@
|
||||
|
||||
# Unmount file systems
|
||||
/bin/umount -a -r
|
||||
+/sbin/vgchange -a n
|
||||
|
||||
# Remount root filesystem read-only
|
||||
/bin/mount -n -o remount,ro /
|
Loading…
x
Reference in New Issue
Block a user