]> git.pld-linux.org Git - projects/geninitrd.git/commitdiff
- --fs is back, but if used warning is writen
authorArtur Frysiak <artur@frysiak.net>
Wed, 20 Feb 2002 10:11:23 +0000 (10:11 +0000)
committerArtur Frysiak <artur@frysiak.net>
Wed, 20 Feb 2002 10:11:23 +0000 (10:11 +0000)
svn-id: @1230

geninitrd

index 52e78ec8878d7f78b62fb3981bf8e3587cd03062..c5a58be23ccca371179a0f376a22cc44deba0125 100755 (executable)
--- a/geninitrd
+++ b/geninitrd
@@ -6,7 +6,7 @@
 #
 # based on mkinitrd from RedHat
 
-RCSID='$Id: geninitrd,v 2.13 2002/02/19 14:43:13 wiget Exp $'
+RCSID='$Id: geninitrd,v 2.14 2002/02/20 10:11:23 wiget Exp $'
 PATH=/sbin:$PATH
 export PATH
 
@@ -15,7 +15,8 @@ VERSION="`echo "$RCSID"|awk '{print $3}'`"
 . /etc/rc.d/init.d/functions
 
 COMPRESS="yes"
-FS="rom"
+# INITRDFS is set later (catch obsoleted FS option)
+#INITRDFS="rom"
 USERAIDSTART="no"
 # it should be safe to remove scsi_mod from here, but I'm not sure...
 PRESCSIMODS="-scsi_mod unknown -sd_mod"
@@ -269,6 +270,16 @@ if [ -r /etc/sysconfig/geninitrd ] ; then
        . /etc/sysconfig/geninitrd
 fi
 
+if [ "x" = "x$INITRDFS" ] ; then
+       if [ "x" = "x$FS" ] ; then
+               # default value
+               INITRDFS="rom"
+       else
+               echo "Warning: FS configuration options is obsoleted. Use INITRDFS instead" 1>&2
+               INITRDFS="$FS"
+       fi
+fi
+
 if [ ! -x /sbin/bsp ] ; then 
        echo "/sbin/bsp is missing !"
        exit 1
@@ -337,11 +348,20 @@ while [ $# -gt 0 ]; do
                fi
                PREMODS="$PREMODS $modname"
                ;;
+       --fs=*)
+               echo "Warning: --fs option is obsoleted. Use --initrdfs instead" 1>&2
+               INITRDFS="`echo $1 | awk -F= '{print $2;}'`"
+               ;;
        --initrdfs=*)
-               FS="`echo $1 | awk -F= '{print $2;}'`"
+               INITRDFS="`echo $1 | awk -F= '{print $2;}'`"
+               ;;
+       --fs)
+               echo "Warning: --fs option is obsoleted. Use --initrdfs instead" 1>&2
+               INITRDFS="$2"
+               shift
                ;;
        --initrdfs)
-               FS="$2"
+               INITRDFS="$2"
                shift
                ;;
        --image-version)
@@ -368,7 +388,7 @@ if [ -z "$target" -o -z "$kernel" ]; then
        usage
 fi
 
-case "$FS" in
+case "$INITRDFS" in
        ext2)
                if [ ! -x /sbin/mke2fs ]; then
                        echo "/sbin/mke2fs is missing" 1>&2
@@ -388,7 +408,7 @@ case "$FS" in
                fi
                ;;
        *)
-               echo "Filesystem $FS on initrd is not supported" 1>&2
+               echo "Filesystem $INITRDFS on initrd is not supported" 1>&2
                exit 1
                ;;
 esac
@@ -570,7 +590,7 @@ if [ -f "$IMAGE" ]; then
        exit 1
 fi
 
-if [ "$FS" = "ext2" ] ; then
+if [ "$INITRDFS" = "ext2" ] ; then
        dd if=/dev/zero of="$IMAGE" bs=1k count="$IMAGESIZE" 2> /dev/null
 
        # We have to "echo y |" so that it doesn't complain about $IMAGE not
@@ -652,7 +672,7 @@ chmod +x "$RCFILE"
 
 (cd "$MNTIMAGE"; tar cf - .) | (cd "$MNTPOINT"; tar xf -)
 
-case "$FS" in
+case "$INITRDFS" in
        ext2)
                umount "$IMAGE"
                ;;
@@ -663,7 +683,7 @@ case "$FS" in
                mkcramfs "$MNTPOINT" "$IMAGE"
                ;;
        *)
-               echo "Filesystem $FS not supported by $0";
+               echo "Filesystem $INITRDFS not supported by $0";
 esac
 
 if is_yes "$COMPRESS" ; then
This page took 0.245044 seconds and 4 git commands to generate.