Print this page
3913 there is no dialup, only zuul

@@ -20,10 +20,13 @@
  */
 /*
  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
+/*
+ * Copyright (c) 2013, Joyent, Inc. All rights reserved.
+ */
 
 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
 /*        All Rights Reserved   */
 
 /*

@@ -1249,12 +1252,10 @@
 }
 
 int
 main(int argc, char *argv[])
 {
-        char *ttyn = ttyname(STDERR_FILENO);
-
         int qflag = 0, needlog = 1, nosync = 0;
         int fast_reboot = 0;
         int prom_reboot = 0;
         uintptr_t mdep = NULL;
         int cmd, fcn, c, aval, r;

@@ -1322,11 +1323,13 @@
                         break;
                 case 'q':
                         qflag = 1;
                         break;
                 case 'y':
-                        ttyn = NULL;
+                        /*
+                         * Option ignored for backwards compatibility.
+                         */
                         break;
                 case 'f':
                         fast_reboot = 1;
                         break;
                 case 'p':

@@ -1446,23 +1449,10 @@
 #if 0   /* For debugging */
         if (mdep != NULL)
                 (void) fprintf(stderr, "mdep = %s\n", (char *)mdep);
 #endif
 
-        if (fcn != AD_BOOT && ttyn != NULL &&
-            strncmp(ttyn, "/dev/term/", strlen("/dev/term/")) == 0) {
-                /*
-                 * TRANSLATION_NOTE
-                 * Don't translate ``halt -y''
-                 */
-                (void) fprintf(stderr,
-                    gettext("%s: dangerous on a dialup;"), cmdname);
-                (void) fprintf(stderr,
-                    gettext("use ``%s -y'' if you are really sure\n"), cmdname);
-                goto fail;
-        }
-
         if (needlog) {
                 char *user = getlogin();
                 struct passwd *pw;
                 char *tty;