SVN: geninitrd/trunk/geninitrd
glen
glen at pld-linux.org
Fri Apr 3 00:24:27 CEST 2009
Author: glen
Date: Fri Apr 3 00:24:27 2009
New Revision: 10281
Modified:
geninitrd/trunk/geninitrd
Log:
- cosmetics, deprecated options are now fatal
Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd (original)
+++ geninitrd/trunk/geninitrd Fri Apr 3 00:24:27 2009
@@ -1172,11 +1172,11 @@
shift
;;
--fs=*)
- warn "--fs option is obsoleted. Use --initrdfs instead"
+ die "--fs option is obsoleted. Use --initrdfs instead"
INITRDFS=${1#--fs=}
;;
--fs)
- warn "--fs option is obsoleted. Use --initrdfs instead"
+ die "--fs option is obsoleted. Use --initrdfs instead"
INITRDFS=$2
shift
;;
@@ -1237,46 +1237,32 @@
fi
if [ -z "$INITRDFS" ]; then
- if [ -z "$FS" ]; then
- # default value
- if [ "$kernel_version" -ge "002005" ]; then
- INITRDFS="initramfs"
- else
- INITRDFS="rom"
- fi
- else
- warn "Warning: FS configuration options is obsoleted. Use INITRDFS instead"
- INITRDFS="$FS"
+ if [ -n "$FS" ]; then
+ # FS= can came only via /etc/sysconfig/geninitrd likely?
+ die "FS configuration option is obsoleted. Use INITRDFS instead"
fi
-fi
-if [ "$kernel_version" -ge "002005" ]; then
- modext=".ko"
+ # default value
+ if [ "$kernel_version" -ge "002005" ]; then
+ INITRDFS="initramfs"
+ else
+ INITRDFS="rom"
+ fi
fi
case "$INITRDFS" in
ext2)
- if [ ! -x /sbin/mke2fs ]; then
- die "/sbin/mke2fs is missing"
- fi
+ [ -x /sbin/mke2fs ] || die "/sbin/mke2fs is missing"
;;
rom|romfs)
- if [ ! -x /sbin/genromfs ]; then
- die "/sbin/genromfs is missing"
- fi
+ [ -x /sbin/genromfs ] || die "/sbin/genromfs is missing"
;;
cram|cramfs)
- if [ ! -x /sbin/mkcramfs ]; then
- die "/sbin/mkcramfs is missing"
- fi
+ [ -x /sbin/mkcramfs ] || die "/sbin/mkcramfs is missing"
;;
initramfs)
- if [ ! -x /bin/cpio ]; then
- die "/bin/cpio is missing"
- fi
- if [ ! -x /usr/bin/find ]; then
- die "/usr/bin/find is missing"
- fi
+ [ -x /bin/cpio ] || die "/bin/cpio is missing"
+ [ -x /usr/bin/find ] || die "/usr/bin/find is missing"
;;
*)
die "Filesystem $INITRDFS on initrd is not supported"
@@ -1299,6 +1285,14 @@
die "/lib/modules/$kernel is not a directory."
fi
+if [ ! -f /proc/mounts ]; then
+ warn "/proc filesystem not mounted, may cause wrong results or failure."
+fi
+
+if [ "$kernel_version" -ge "002005" ]; then
+ modext=".ko"
+fi
+
if [ "$INITRDFS" != "initramfs" ]; then
if is_yes "$FB_SPLASH"; then
warn "Using fbsplash requires INITRDFS=initramfs; skipping fbsplash generation"
@@ -1318,10 +1312,6 @@
warn "bootsplash and fbsplash are exclusive!"
fi
-if [ ! -f /proc/mounts ]; then
- warn "/proc filesystem not mounted, may cause wrong results or failure."
-fi
-
cache_modprobe_conf
for n in $PREMODS; do
More information about the pld-cvs-commit
mailing list