Print this page
uadmin


 234                                 /* First argument is rootdir */
 235                                 if (strncmp(&newarg[strlen(newarg)-4],
 236                                     "unix", 4) != 0) {
 237                                         newarg = strtok(NULL, " ");
 238                                         off = newarg - head;
 239                                 }
 240 
 241                                 /*
 242                                  * If we are using alternate root via
 243                                  * mountpoint or a different BE, don't
 244                                  * bother to update the temp menu entry.
 245                                  */
 246                                 if (off > 0)
 247                                         break;
 248                         }
 249 
 250                         /* are we rebooting to a GRUB menu entry? */
 251                         if (isdigit(bargs[0])) {
 252                                 int entry = strtol(bargs, NULL, 10);
 253                                 (void) snprintf(cmdbuf, sizeof (cmdbuf),
 254                                     "/sbin/bootadm set-menu %sdefault=%d",
 255                                     altroot, entry);
 256                         } else {
 257                                 (void) snprintf(cmdbuf, sizeof (cmdbuf),
 258                                     "/sbin/bootadm -m update_temp %s"
 259                                     "-o %s%s%s", altroot, quote,
 260                                     &bargs[off], quote);
 261                         }
 262                         (void) system(cmdbuf);
 263                 }
 264                 check_archive_update();
 265         }
 266 
 267         return (__uadmin(cmd, fcn, mdep));
 268 }


 234                                 /* First argument is rootdir */
 235                                 if (strncmp(&newarg[strlen(newarg)-4],
 236                                     "unix", 4) != 0) {
 237                                         newarg = strtok(NULL, " ");
 238                                         off = newarg - head;
 239                                 }
 240 
 241                                 /*
 242                                  * If we are using alternate root via
 243                                  * mountpoint or a different BE, don't
 244                                  * bother to update the temp menu entry.
 245                                  */
 246                                 if (off > 0)
 247                                         break;
 248                         }
 249 
 250                         /* are we rebooting to a GRUB menu entry? */
 251                         if (isdigit(bargs[0])) {
 252                                 int entry = strtol(bargs, NULL, 10);
 253                                 (void) snprintf(cmdbuf, sizeof (cmdbuf),
 254                                     "/sbin/grubadm %s --set-default %d",
 255                                     altroot, entry);
 256                         } else {
 257                                 (void) snprintf(cmdbuf, sizeof (cmdbuf),
 258                                     "/sbin/grubadm --new --default %s"
 259                                     "--set-opts %s%s%s", altroot, quote,
 260                                     &bargs[off], quote);
 261                         }
 262                         (void) system(cmdbuf);
 263                 }
 264                 check_archive_update();
 265         }
 266 
 267         return (__uadmin(cmd, fcn, mdep));
 268 }