summaryrefslogtreecommitdiff
path: root/usr/src/cmd/halt
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/cmd/halt')
-rw-r--r--usr/src/cmd/halt/halt.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/usr/src/cmd/halt/halt.c b/usr/src/cmd/halt/halt.c
index 528823531e..ba969a369c 100644
--- a/usr/src/cmd/halt/halt.c
+++ b/usr/src/cmd/halt/halt.c
@@ -22,6 +22,9 @@
* 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 */
@@ -1251,8 +1254,6 @@ do_archives_update(int do_fast_reboot)
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;
@@ -1324,7 +1325,9 @@ main(int argc, char *argv[])
qflag = 1;
break;
case 'y':
- ttyn = NULL;
+ /*
+ * Option ignored for backwards compatibility.
+ */
break;
case 'f':
fast_reboot = 1;
@@ -1448,19 +1451,6 @@ main(int argc, char *argv[])
(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;