summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrscott <none@none>2007-01-22 20:18:41 -0800
committerrscott <none@none>2007-01-22 20:18:41 -0800
commit0d69385cb7ad4279382815d1771fb178793e16dc (patch)
treec70f11c2a09e8a9d2ec2da9942d615e9fcc53ea8
parent9a411307f0d1eedbc81618ec290e0685284d8a2b (diff)
downloadillumos-gate-0d69385cb7ad4279382815d1771fb178793e16dc.tar.gz
6512864 cleanup needed in dboot's bootadm/bfuonnv_57
-rw-r--r--usr/src/cmd/boot/bootadm/bootadm.c9
-rw-r--r--usr/src/cmd/boot/bootadm/message.h16
-rw-r--r--usr/src/cmd/boot/scripts/create_ramdisk.ksh6
-rw-r--r--usr/src/tools/scripts/bfu.sh2
4 files changed, 20 insertions, 13 deletions
diff --git a/usr/src/cmd/boot/bootadm/bootadm.c b/usr/src/cmd/boot/bootadm/bootadm.c
index fcbb2988ce..2771cd943c 100644
--- a/usr/src/cmd/boot/bootadm/bootadm.c
+++ b/usr/src/cmd/boot/bootadm/bootadm.c
@@ -428,7 +428,7 @@ parse_args_internal(int argc, char *argv[])
opterr = 0;
error = 0;
- while ((c = getopt(argc, argv, "a:d:fm:no:vCR:xX")) != -1) {
+ while ((c = getopt(argc, argv, "a:d:fm:no:vCR:")) != -1) {
switch (c) {
case 'a':
if (bam_cmd) {
@@ -3188,7 +3188,12 @@ find_boot_entry(menu_t *mp, char *title, char *root, char *module,
continue;
}
- /* check for matching module entry (failsafe or normal) */
+ /*
+ * Check for matching module entry (failsafe or normal). We
+ * use a strncmp to match "module" or "module$", since we
+ * don't know which one it should be. If it fails to match,
+ * we go around the loop again.
+ */
lp = lp->next; /* advance to module line */
if ((strncmp(lp->cmd, menu_cmds[MODULE_CMD],
strlen(menu_cmds[MODULE_CMD])) != 0) ||
diff --git a/usr/src/cmd/boot/bootadm/message.h b/usr/src/cmd/boot/bootadm/message.h
index f393940439..4b3845adb0 100644
--- a/usr/src/cmd/boot/bootadm/message.h
+++ b/usr/src/cmd/boot/bootadm/message.h
@@ -332,30 +332,30 @@ the failsafe archive unbootable\n")
#define NOT_DBOOT \
gettext("bootadm set-menu %s may only be run on directboot kernels.\n")
-#define DEFAULT_NOT_BAM \
-gettext("Default menu.lst entry is not controlled by bootadm. Exiting\n")
+#define DEFAULT_NOT_BAM gettext( \
+"Default /boot/grub/menu.lst entry is not controlled by bootadm. Exiting\n")
#define NO_KERNEL_MATCH \
gettext("Unexpected kernel command on line %d.\n\
-** YOU MUST MANUALLY CORRECT menu.lst BEFORE REBOOT! **\n\
+** YOU MUST MANUALLY CORRECT /boot/grub/menu.lst BEFORE REBOOT! **\n\
For details, see %s\n")
#define NO_MODULE_MATCH \
gettext("Unexpected module command on line %d.\n\
-** YOU MUST MANUALLY CORRECT menu.lst BEFORE REBOOT! **\n\
+** YOU MUST MANUALLY CORRECT /boot/grub/menu.lst BEFORE REBOOT! **\n\
For details, see %s\n")
#define NO_KERNELS_FOUND \
gettext("Could not find any kernel lines to update. Only entries created by\n\
bootadm(1M) and lu(1M) can be updated. All other must be manually changed.\n\
-** YOU MUST MANUALLY CORRECT menu.lst BEFORE REBOOT! **\n\
+** YOU MUST MANUALLY CORRECT /boot/grub/menu.lst BEFORE REBOOT! **\n\
For details on updating entries, see %s\n")
#define HAND_ADDED_ENTRY \
gettext("On upgrades, bootadm(1M) will only upgrade entries added by\n\
-bootadm(1M) or lu(1M). The following entry or entries in menu.lst will\n\
-not be upgraded. For details on updating entries, see\n\
-%s\n")
+bootadm(1M) or lu(1M). The following entry or entries in\n\
+/boot/grub/menu.lst will not be upgraded. For details on updating entries,\n\
+see %s\n")
#define NOT_ELF_FILE gettext("%s is not an ELF file.\n")
diff --git a/usr/src/cmd/boot/scripts/create_ramdisk.ksh b/usr/src/cmd/boot/scripts/create_ramdisk.ksh
index 85a5082780..dcfef6433c 100644
--- a/usr/src/cmd/boot/scripts/create_ramdisk.ksh
+++ b/usr/src/cmd/boot/scripts/create_ramdisk.ksh
@@ -48,9 +48,11 @@ do
echo "Creating ram disk for $ALT_ROOT"
fi
;;
- -n|--nocompress) compress=no ;;
+ -n|--nocompress) compress=no
+ ;;
*) echo Usage: ${0##*/}: [-R \<root\>] [--nocompress]
- exit ;;
+ exit
+ ;;
esac
shift
done
diff --git a/usr/src/tools/scripts/bfu.sh b/usr/src/tools/scripts/bfu.sh
index 694bc9b51b..9ba707db44 100644
--- a/usr/src/tools/scripts/bfu.sh
+++ b/usr/src/tools/scripts/bfu.sh
@@ -4625,7 +4625,7 @@ install_failsafe()
{
if [ "$root" != "/" ] || \
[ -f /boot/x86.miniroot-safe ] || \
- [ -x ${GATEPATH}/public/bin/update_failsafe ]; then
+ [ ! -x ${GATEPATH}/public/bin/update_failsafe ]; then
#
# Either we're not bfu'ing /, or the failsafe archives were
# already installed, or update_failsafe is not available.