From 3c777488c38d22c88ca9ca0547e48173aeee1fa7 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 24 Oct 2005 09:44:04 +0200 Subject: move the lvm bits to hooks/lvm. allows to remove dependency on lvm as requested by several users. --- debian/changelog | 4 +++- hook-functions | 4 ++-- hooks/lvm | 27 +++++++++++++++++++++++++++ mkinitramfs | 3 --- 4 files changed, 32 insertions(+), 6 deletions(-) create mode 100755 hooks/lvm diff --git a/debian/changelog b/debian/changelog index 3c8fe88..37b3509 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,7 +7,9 @@ initramfs-tools (0.35) unstable; urgency=low * Change name of virtual package that is provided into linux-initramfs-tool. - -- maximilian attems Mon, 24 Oct 2005 09:08:48 +0200 + * Add hooks/lvm, those remove dependency on lvm2. + + -- maximilian attems Mon, 24 Oct 2005 09:38:41 +0200 initramfs-tools (0.32) unstable; urgency=low diff --git a/hook-functions b/hook-functions index 189db2e..0eab2a2 100644 --- a/hook-functions +++ b/hook-functions @@ -63,7 +63,7 @@ dep_add_modules() { # Things that are too hard to autodetect. - for x in md raid0 raid1 raid5 raid6 ext2 ext3 isofs jfs nfs reiserfs xfs af_packet dm_mod; do + for x in md raid0 raid1 raid5 raid6 ext2 ext3 isofs jfs nfs reiserfs xfs af_packet; do manual_add_modules "${x}" done @@ -99,7 +99,7 @@ dep_add_modules() auto_add_modules() { # base - for x in md raid0 raid1 raid5 raid6 ehci-hcd ohci-hcd uhci-hcd usbhid usb-storage ext2 ext3 isofs jfs nfs reiserfs xfs af_packet dm_mod; do + for x in md raid0 raid1 raid5 raid6 ehci-hcd ohci-hcd uhci-hcd usbhid usb-storage ext2 ext3 isofs jfs nfs reiserfs xfs af_packet; do manual_add_modules "${x}" done diff --git a/hooks/lvm b/hooks/lvm new file mode 100755 index 0000000..fa4f8af --- /dev/null +++ b/hooks/lvm @@ -0,0 +1,27 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +prereqs) + prereqs + exit 0 + ;; +esac + +if [ ! -x /sbin/vgchange ]; then + exit 0 +fi + +. /usr/share/initramfs-tools/hook-functions + +cp /lib/lvm-200/vgchange "${DESTDIR}/sbin" + +for x in dm_mod; do + manual_add_modules ${x} +done diff --git a/mkinitramfs b/mkinitramfs index d03c346..5b48a9d 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -189,9 +189,6 @@ cp /etc/modprobe.d/aliases "${DESTDIR}/etc/modprobe.d" cp /sbin/mdadm "${DESTDIR}/sbin" cp /sbin/mdrun "${DESTDIR}/sbin" -# LVM -cp /lib/lvm-200/vgchange "${DESTDIR}/sbin" - run_scripts /usr/share/initramfs-tools/hooks run_scripts /etc/mkinitramfs/hooks -- cgit v1.2.3