From 4af5e99124d083d6c4f9eadf7a898267b57ac27a Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 25 Mar 2011 13:00:24 +0100 Subject: [PATCH] move dracut version file to /lib/dracut/dracut-$version --- lsinitrd | 2 +- modules.d/10rpmversion/module-setup.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lsinitrd b/lsinitrd index 6e2d82b8..906946db 100755 --- a/lsinitrd +++ b/lsinitrd @@ -40,7 +40,7 @@ fi echo "$1:" echo "========================================================================" -$CAT $1 | cpio --extract --verbose --quiet --to-stdout 'dracut-*' 2>/dev/null +$CAT $1 | cpio --extract --verbose --quiet --to-stdout 'lib/dracut/dracut-*' 2>/dev/null echo "========================================================================" $CAT $1 | cpio --extract --verbose --quiet --list echo "========================================================================" diff --git a/modules.d/10rpmversion/module-setup.sh b/modules.d/10rpmversion/module-setup.sh index e26d7852..60a8d891 100755 --- a/modules.d/10rpmversion/module-setup.sh +++ b/modules.d/10rpmversion/module-setup.sh @@ -13,11 +13,12 @@ depends() { install() { if [ -e "$moddir/dracut-version" ]; then dracut_rpm_version=$(cat "$moddir/dracut-version") - inst "$moddir/dracut-version" /$dracut_rpm_version + inst "$moddir/dracut-version" /lib/dracut/$dracut_rpm_version else if rpm -qf $(type -P $0) &>/dev/null; then dracut_rpm_version=$(rpm -qf --qf '%{name}-%{version}-%{release}\n' $(type -P $0) | { ver="";while read line;do ver=$line;done;echo $ver;} ) - echo $dracut_rpm_version > $initdir/$dracut_rpm_version + mkdir -m 0755 -p $initdir/lib $initdir/lib/dracut + echo $dracut_rpm_version > $initdir/lib/dracut/$dracut_rpm_version fi fi inst_hook cmdline 01 "$moddir/version.sh" -- 2.11.4.GIT