fixed mkconfig and mkrescue scripts
This commit is contained in:
parent
1c1261d985
commit
7a64e28d0e
2 changed files with 26 additions and 5 deletions
|
@ -50,7 +50,11 @@ EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check the arguments.
|
# Check the arguments.
|
||||||
for option in "$@"; do
|
while test $# -gt 0
|
||||||
|
do
|
||||||
|
option=$1
|
||||||
|
shift
|
||||||
|
|
||||||
case "$option" in
|
case "$option" in
|
||||||
-h | --help)
|
-h | --help)
|
||||||
usage
|
usage
|
||||||
|
@ -58,9 +62,9 @@ for option in "$@"; do
|
||||||
-v | --version)
|
-v | --version)
|
||||||
echo "$0 (GNU GRUB ${package_version})"
|
echo "$0 (GNU GRUB ${package_version})"
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
-o)
|
-o | --output)
|
||||||
shift
|
|
||||||
grub_cfg=$1
|
grub_cfg=$1
|
||||||
|
shift
|
||||||
;;
|
;;
|
||||||
--output=*)
|
--output=*)
|
||||||
grub_cfg=`echo "$option" | sed 's/--output=//'`
|
grub_cfg=`echo "$option" | sed 's/--output=//'`
|
||||||
|
|
|
@ -42,8 +42,8 @@ Make GRUB rescue image.
|
||||||
|
|
||||||
-h, --help print this message and exit
|
-h, --help print this message and exit
|
||||||
-v, --version print the version information and exit
|
-v, --version print the version information and exit
|
||||||
|
-o, --output=FILE save output in FILE [required]
|
||||||
--modules=MODULES pre-load specified modules MODULES
|
--modules=MODULES pre-load specified modules MODULES
|
||||||
--output=FILE save output in FILE [required]
|
|
||||||
|
|
||||||
$0 generates a bootable rescue image with specified source files or directories.
|
$0 generates a bootable rescue image with specified source files or directories.
|
||||||
|
|
||||||
|
@ -52,7 +52,11 @@ EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check the arguments.
|
# Check the arguments.
|
||||||
for option in "$@"; do
|
while test $# -gt 0
|
||||||
|
do
|
||||||
|
option=$1
|
||||||
|
shift
|
||||||
|
|
||||||
case "$option" in
|
case "$option" in
|
||||||
-h | --help)
|
-h | --help)
|
||||||
usage
|
usage
|
||||||
|
@ -60,11 +64,24 @@ for option in "$@"; do
|
||||||
-v | --version)
|
-v | --version)
|
||||||
echo "$0 (GNU GRUB ${PACKAGE_VERSION})"
|
echo "$0 (GNU GRUB ${PACKAGE_VERSION})"
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
|
|
||||||
|
--modules)
|
||||||
|
modules=$1; shift ;;
|
||||||
--modules=*)
|
--modules=*)
|
||||||
modules=`echo "$option" | sed 's/--modules=//'` ;;
|
modules=`echo "$option" | sed 's/--modules=//'` ;;
|
||||||
|
|
||||||
|
-o | --output)
|
||||||
|
output_image=$1; shift ;;
|
||||||
--output=*)
|
--output=*)
|
||||||
output_image=`echo "$option" | sed 's/--output=//'` ;;
|
output_image=`echo "$option" | sed 's/--output=//'` ;;
|
||||||
|
|
||||||
# Intentionally undocumented
|
# Intentionally undocumented
|
||||||
|
--override-directory)
|
||||||
|
override_dir=$1
|
||||||
|
shift
|
||||||
|
PATH=${override_dir}:$PATH
|
||||||
|
export PATH
|
||||||
|
;;
|
||||||
--override-directory=*)
|
--override-directory=*)
|
||||||
override_dir=`echo "${option}/" | sed 's/--override-directory=//'`
|
override_dir=`echo "${option}/" | sed 's/--override-directory=//'`
|
||||||
PATH=${override_dir}:$PATH
|
PATH=${override_dir}:$PATH
|
||||||
|
|
Loading…
Reference in a new issue