Print this page
OS-2288 there is no dialup, only zuul

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/halt/halt.c
          +++ new/usr/src/cmd/halt/halt.c
↓ open down ↓ 1255 lines elided ↑ open up ↑
1256 1256                  (void) fprintf(stderr, gettext("%s: WARNING, unable to start "
1257 1257                      "boot archive update\n"), cmdname);
1258 1258          else
1259 1259                  while (waitpid(pid, NULL, 0) == -1 && errno == EINTR)
1260 1260                          ;
1261 1261  }
1262 1262  
1263 1263  int
1264 1264  main(int argc, char *argv[])
1265 1265  {
1266      -        char *ttyn = ttyname(STDERR_FILENO);
1267      -
1268 1266          int qflag = 0, needlog = 1, nosync = 0;
1269 1267          int fast_reboot = 0;
1270 1268          int prom_reboot = 0;
1271 1269          uintptr_t mdep = NULL;
1272 1270          int cmd, fcn, c, aval, r;
1273 1271          const char *usage;
1274 1272          const char *optstring;
1275 1273          zoneid_t zoneid = getzoneid();
1276 1274          int need_check_zones = 0;
1277 1275          char bootargs_buf[BOOTARGS_MAX];
↓ open down ↓ 51 lines elided ↑ open up ↑
1329 1327                  case 'l':
1330 1328                          needlog = 0;
1331 1329                          break;
1332 1330                  case 'n':
1333 1331                          nosync = 1;
1334 1332                          break;
1335 1333                  case 'q':
1336 1334                          qflag = 1;
1337 1335                          break;
1338 1336                  case 'y':
1339      -                        ttyn = NULL;
     1337 +                        /*
     1338 +                         * Option ignored for backwards compatibility.
     1339 +                         */
1340 1340                          break;
1341 1341                  case 'f':
1342 1342                          fast_reboot = 1;
1343 1343                          break;
1344 1344                  case 'p':
1345 1345                          prom_reboot = 1;
1346 1346                          break;
1347 1347  #if defined(__i386)
1348 1348                  case 'e':
1349 1349                          bename = optarg;
↓ open down ↓ 103 lines elided ↑ open up ↑
1453 1453                   */
1454 1454                  if (strlen(bootargs_buf) != 0)
1455 1455                          mdep = (uintptr_t)bootargs_buf;
1456 1456          }
1457 1457  
1458 1458  #if 0   /* For debugging */
1459 1459          if (mdep != NULL)
1460 1460                  (void) fprintf(stderr, "mdep = %s\n", (char *)mdep);
1461 1461  #endif
1462 1462  
1463      -        if (fcn != AD_BOOT && ttyn != NULL &&
1464      -            strncmp(ttyn, "/dev/term/", strlen("/dev/term/")) == 0) {
1465      -                /*
1466      -                 * TRANSLATION_NOTE
1467      -                 * Don't translate ``halt -y''
1468      -                 */
1469      -                (void) fprintf(stderr,
1470      -                    gettext("%s: dangerous on a dialup;"), cmdname);
1471      -                (void) fprintf(stderr,
1472      -                    gettext("use ``%s -y'' if you are really sure\n"), cmdname);
1473      -                goto fail;
1474      -        }
1475      -
1476 1463          if (needlog) {
1477 1464                  char *user = getlogin();
1478 1465                  struct passwd *pw;
1479 1466                  char *tty;
1480 1467  
1481 1468                  openlog(cmdname, 0, LOG_AUTH);
1482 1469                  if (user == NULL && (pw = getpwuid(getuid())) != NULL)
1483 1470                          user = pw->pw_name;
1484 1471                  if (user == NULL)
1485 1472                          user = "root";
↓ open down ↓ 206 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX