10rpmversion: try to get the correct dracut rpm version during %post
authorHarald Hoyer <harald@redhat.com>
Tue, 15 Sep 2009 11:12:52 +0000 (13:12 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 15 Sep 2009 13:00:24 +0000 (15:00 +0200)
modules.d/10rpmversion/install

index 1a49f31..cbe61fc 100755 (executable)
@@ -1,5 +1,5 @@
 
-dracut_rpm_version=$(rpm -qf --qf '%{name}-%{version}-%{release}' $(which $0))
+dracut_rpm_version=$(rpm -qf --qf '%{name}-%{version}-%{release}\n' $(which $0) | { ver="";while read line;do ver=$line;done;echo $ver;} )
 if [ $? -eq 0 ]; then
        echo $dracut_rpm_version > $initdir/$dracut_rpm_version
 fi