SVN: geninitrd/trunk/geninitrd
glen
glen at pld-linux.org
Tue Apr 7 00:40:07 CEST 2009
Author: glen
Date: Tue Apr 7 00:40:06 2009
New Revision: 10319
Modified:
geninitrd/trunk/geninitrd
Log:
- allow non-root to see usage
Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd (original)
+++ geninitrd/trunk/geninitrd Tue Apr 7 00:40:06 2009
@@ -761,11 +761,6 @@
ln -s init $DESTDIR/linuxrc
}
-# main()
-if [ "$(id -u)" != 0 ]; then
- die "You need to be root to generate initrd"
-fi
-
if [ -r /etc/sysconfig/geninitrd ]; then
. /etc/sysconfig/geninitrd
fi
@@ -918,6 +913,11 @@
exit 1
fi
+# main()
+if [ "$(id -u)" != 0 ]; then
+ die "You need to be root to generate initrd"
+fi
+
if [ -d /usr/lib64 ]; then
_lib=lib64
else
@@ -1241,7 +1241,7 @@
(cd $DESTDIR; find . | cpio --quiet -H newc -o > "$IMAGE")
;;
*)
- echo "Filesystem $INITRDFS not supported by $PROGRAM";
+ die "Filesystem $INITRDFS not supported by $PROGRAM"
esac
if is_yes "$COMPRESS"; then
More information about the pld-cvs-commit
mailing list