SVN: geninitrd/trunk/geninitrd
glen
glen at pld-linux.org
Mon Sep 3 14:41:11 CEST 2007
Author: glen
Date: Mon Sep 3 14:41:10 2007
New Revision: 8710
Modified:
geninitrd/trunk/geninitrd
Log:
- prefix errors with Error:
Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd (original)
+++ geninitrd/trunk/geninitrd Mon Sep 3 14:41:10 2007
@@ -188,7 +188,7 @@
fi
level=$((level + 1))
if [ $level -gt 20 ] ; then
- echo >&2 "$origmodule: cycle in $depfile"
+ echo >&2 "Error: $origmodule: cycle in $depfile"
exit 1
fi
@@ -213,7 +213,7 @@
return
fi
- echo >&2 "module $fmPath present in modules.dep, but not in filesystem (kernel = $kernel)"
+ echo >&2 "Error: module $fmPath present in modules.dep, but not in filesystem (kernel = $kernel)"
exit 1
fi
@@ -307,7 +307,7 @@
fi
if [ "$raidfound" != "yes" -a -f /etc/raidtab ]; then
- echo >&2 "ERROR: raidtools are not longer supported. Please migrate to mdadm setup!"
+ echo >&2 "Error: raidtools are not longer supported. Please migrate to mdadm setup!"
exit 1
fi
@@ -328,7 +328,7 @@
;;
esac
else
- echo >&2 "ERROR: RAID devices not found for \"$1\", check your configuration!"
+ echo >&2 "Error: RAID devices not found for \"$1\", check your configuration!"
exit 1
fi
@@ -481,7 +481,7 @@
rc=$?
if [ $rc -gt 127 ]; then
# lvdisplay terminated by signal! most likely it segfaulted.
- echo >&2 "ERROR: Unexpected exit from 'lvdisplay $node': $rc - are your lvm tools broken?"
+ echo >&2 "Error: Unexpected exit from 'lvdisplay $node': $rc - are your lvm tools broken?"
exit 1
fi
@@ -501,7 +501,7 @@
if is_yes "`echo "$1" | awk '/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:|\/dev\/nfs)/ { print "yes"; }'`"; then
if [ ! -x /usr/bin/pcidev -a -z "$NFS_ETH_MODULES" ] ; then
- echo "ERROR: root on NFS but /usr/bin/pcidev not found." >&2
+ echo "Error: root on NFS but /usr/bin/pcidev not found." >&2
echo "Please install correct pci-database package and rerun $0." >&2
exit 1
fi
@@ -532,7 +532,7 @@
ataraidmodules="`awk '/ataraid_hostadapter/ && ! /^[\t ]*#/ { print $3; }' $modulefile`"
if -n "$ataraidmodules" ; then
# FIXME: think about modules compiled in kernel
- echo "ERROR: ataraid_hostadapter alias not defined in $modulefile !"
+ echo "Error: ataraid_hostadapter alias not defined in $modulefile !"
echo "Please set it and run $0 again."
exit 1
fi
@@ -541,16 +541,16 @@
done
# check to see if we need to set up a loopback filesystem
elif is_yes "`echo "$1" | awk -F/ '{print($3);}' | awk '/loop/ { print "yes"; }'`" ; then
- echo >&2 "Sorry, root on loop device isn't supported."
+ echo >&2 "Error: Sorry, root on loop device isn't supported."
exit 1
# TODO: rewrite for bsp and make nfs ready
if [ ! -x /sbin/losetup ]; then
- echo "losetup is missing"
+ echo "Error: losetup is missing"
exit 1
fi
key="^# $(echo $1 | awk -F/ '{print($3);}' | tr '[a-z]' '[A-Z]'):"
if ! is_yes "`awk '/'$key'/ { print( "yes"); }' $fstab`" ; then
- echo >&2 "The root filesystem is on a $1, but there is no magic entry in $fstab"
+ echo >&2 "Error: The root filesystem is on a $1, but there is no magic entry in $fstab"
echo >&2 "for this device. Consult the geninitrd man page for more information"
exit 1
fi
@@ -567,14 +567,14 @@
node="$1"
if [ ! -f /sbin/initrd-lvm -o ! -x /sbin/lvdisplay -o ! -x /sbin/pvdisplay ] ; then
- echo "ERROR: root on LVM but /sbin/initrd-lvm, /sbin/lvdisplay and /sbin/pvdisplay not found." >&2
+ echo "Error: root on LVM but /sbin/initrd-lvm, /sbin/lvdisplay and /sbin/pvdisplay not found." >&2
echo "Please install lvm(2) and lvm(2)-initrd package and rerun $0." >&2
exit 1
fi
if [ -z "$LVMTOOLSVERSION" ] ; then
LVMTOOLSVERSION=$(/sbin/initrd-lvm vgchange --version 2>/dev/null|head -n 1|awk '{gsub("vgchange: Logical Volume Manager ",NIL); gsub("LVM version: ",NIL); gsub(/\..*/,NIL); print $1}')
if [ -z "$LVMTOOLSVERSION" ] ; then
- echo "ERROR: Can't determine LVM tools version. Please set LVMTOOLSVERSION" >&2
+ echo "Error: Can't determine LVM tools version. Please set LVMTOOLSVERSION" >&2
echo "and rerun $0." >&2
exit 1
fi
@@ -588,7 +588,7 @@
find_modules_for $device
done
else
- echo "ERROR: I wasn't able to find PV (via lvdisplay and pvdisplay)." >&2
+ echo "Error: I wasn't able to find PV (via lvdisplay and pvdisplay)." >&2
echo "You can try to set PVDEVICES in /etc/sysconfig/geninitrd." >&2
exit 1
fi
@@ -598,7 +598,7 @@
findmodule "-lvm"
findmodule "-lvm-mod"
else
- echo "ERROR: LVM version $LVMTOOLSVERSION is not supported yet." >&2
+ echo "Error: LVM version $LVMTOOLSVERSION is not supported yet." >&2
exit 1
fi
debug "LVM $LVMTOOLSVERSION enabled"
@@ -710,7 +710,7 @@
fi
if [ ! -x /bin/initrd-busybox ] ; then
- echo "/bin/initrd-busybox is missing!"
+ echo "Error: /bin/initrd-busybox is missing!"
exit 1
fi
@@ -886,7 +886,7 @@
INSMOD="/sbin/insmod.static.modutils"
fi
if [ ! -f "$INSMOD" ] ; then
- echo "insmod.static requested but /sbin/insmod.static not found !" >&2
+ echo "Error: insmod.static requested but /sbin/insmod.static not found !" >&2
exit 1
fi
fi
@@ -894,34 +894,34 @@
case "$INITRDFS" in
ext2)
if [ ! -x /sbin/mke2fs ]; then
- echo >&2 "/sbin/mke2fs is missing"
+ echo >&2 "Error: /sbin/mke2fs is missing"
exit 1
fi
;;
rom)
if [ ! -x /sbin/genromfs ]; then
- echo >&2 "/sbin/genromfs is missing"
+ echo >&2 "Error: /sbin/genromfs is missing"
exit 1
fi
;;
cram)
if [ ! -x /sbin/mkcramfs ]; then
- echo >&2 "/sbin/mkcramfs is missing"
+ echo >&2 "Error: /sbin/mkcramfs is missing"
exit 1
fi
;;
initramfs)
if [ ! -x /bin/cpio ]; then
- echo >&2 "/bin/cpio is missing"
+ echo >&2 "Erro: /bin/cpio is missing"
exit 1
fi
if [ ! -x /usr/bin/find ]; then
- echo >&2 "/usr/bin/find is missing"
+ echo >&2 "Error: /usr/bin/find is missing"
exit 1
fi
;;
*)
- echo >&2 "Filesystem $INITRDFS on initrd is not supported"
+ echo >&2 "Error: Filesystem $INITRDFS on initrd is not supported"
exit 1
;;
esac
@@ -931,28 +931,28 @@
fi
if [ -z "$force" -a -f "$target" ]; then
- echo >&2 "$target already exists."
+ echo >&2 "Error: $target already exists."
exit 1
fi
if [ ! -d "/lib/modules/$kernel" ]; then
- echo >&2 "/lib/modules/$kernel is not a directory."
+ echo >&2 "Error: /lib/modules/$kernel is not a directory."
exit 1
fi
if is_yes "$USE_SUSPEND"; then
if is_yes "$USE_SUSPEND2"; then
- echo >&2 "Suspend2 shouldn't be used in parallel with mainline suspend!."
+ echo >&2 "Error: Suspend2 shouldn't be used in parallel with mainline suspend!."
exit 1
fi
fi
if is_yes "$FB_SPLASH"; then
if is_yes "$BOOT_SPLASH"; then
- echo >&2 "You can't use both bootsplash and fbsplash! Please choose one."
+ echo >&2 "Error: You can't use both bootsplash and fbsplash! Please choose one."
exit 1
elif [ "$INITRDFS" != "initramfs" ]; then
- echo >&2 "FB_SPLASH works only if INITRDFS is initramfs!."
+ echo >&2 "Error: FB_SPLASH works only if INITRDFS is initramfs!."
exit 1
fi
fi
@@ -1015,12 +1015,12 @@
RCFILE="$MNTIMAGE/linuxrc"
if [ -f "$MNTIMAGE" ]; then
- echo >&2 "$MNTIMAGE already exists. Remove it and try again"
+ echo >&2 "Error: $MNTIMAGE already exists. Remove it and try again"
exit 1
fi
if [ -f "$IMAGE" ]; then
- echo >&2 "$IMAGE already exists. Remove it and try again"
+ echo >&2 "Error: $IMAGE already exists. Remove it and try again"
exit 1
fi
@@ -1083,7 +1083,7 @@
initrd_gen_suspend() {
if [ ! -x /usr/sbin/resume ]; then
- echo "/usr/sbin/resume is missing !"
+ echo "Error: /usr/sbin/resume is missing !"
exit 1
fi
mkdir -p $MNTIMAGE/etc
@@ -1140,7 +1140,7 @@
mkdir -p $MNTIMAGE/sys
if [ ! -x /sbin/initrd-udevd ]; then
- echo >&2 "/sbin/initrd-udevd not present; aborted"
+ echo >&2 "Error: /sbin/initrd-udevd not present; aborted"
exit 1
fi
@@ -1176,13 +1176,13 @@
initrd_gen_dmraid() {
if [ ! -x /sbin/dmraid-initrd ] ; then
- echo "/sbin/dmraid-initrd is missing missing !"
+ echo "Error: /sbin/dmraid-initrd is missing missing !"
exit 1
fi
# AFAIR it just needs tmpfs on /dev.
if [ ! -x $MNTIMAGE/sbin/udevd ]; then
- echo "udev is needed on target initrd for dmraid to work!"
+ echo "Error: udev is needed on target initrd for dmraid to work!"
exit 1
fi
@@ -1205,7 +1205,7 @@
debug "Setting up mdadm..."
if [ ! -x /sbin/mdadm -o ! -x /sbin/initrd-mdassemble ] ; then
- echo "/sbin/mdadm or /sbin/initrd-mdassemble is missing !"
+ echo "Error: /sbin/mdadm or /sbin/initrd-mdassemble is missing !"
exit 1
fi
More information about the pld-cvs-commit
mailing list