SVN: geninitrd/trunk/geninitrd

glen glen at pld-linux.org
Wed Feb 7 11:33:04 CET 2007


Author: glen
Date: Wed Feb  7 11:33:03 2007
New Revision: 8234

Modified:
   geninitrd/trunk/geninitrd
Log:
- rc-scripts functions sets default PATH
- make example in usage() more actual

Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd	(original)
+++ geninitrd/trunk/geninitrd	Wed Feb  7 11:33:03 2007
@@ -14,10 +14,7 @@
 #
 
 RCSID='$Id$'
-PATH=/sbin:$PATH
-export PATH
-
-VERSION="`echo "$RCSID"|awk '{print $3}'`"
+VERSION=$(echo "$RCSID" | awk '{print $3}')
 
 . /etc/rc.d/init.d/functions
 
@@ -67,7 +64,9 @@
 fi
 
 usage () {
-	echo "usage: `basename $0` [--version] [-v] [-f] [--ifneeded] [--preload <module>]"
+	self=$(basename "$0")
+	uname_r=$(uname -r)
+	echo "usage: $self [--version] [-v] [-f] [--ifneeded] [--preload <module>]"
 	echo "       [--with=<module>] [--image-version] [--fstab=<fstab>] [--nocompress]"
 	echo "       [--initrdfs=rom|ext2|cram] [--modules-conf=<modules.conf>]"
 	echo "       [--with-raidstart] [--without-raidstart] [--with-insmod-static]"
@@ -75,7 +74,9 @@
 	echo "       [--lvmtoolsversion=1|2] [--with-udev] [--without-udev]"
 	echo "       [--without-suspend] [--without-suspend2] [--without-dmraid]"
 	echo "       <initrd-image> <kernel-version>"
-	echo "       (ex: `basename $0` /boot/initrd-2.2.5-15.img 2.2.5-15)"
+	echo ""
+	echo "example:"
+	echo "  $self -f --initrdfs=rom /boot/initrd-$uname_r.gz $uname_r"
 	exit 1
 }
 


More information about the pld-cvs-commit mailing list