changeset 14090:613489527e1f

3913 there is no dialup, only zuul Reviewed by: Keith M Wesolowski <wesolows@foobazco.org> Approved by: Dan McDonald <danmcd@nexenta.com>
author Joshua M. Clulow <jmc@joyent.com>
date Fri, 26 Jul 2013 18:53:37 -0700
parents 520f3adc5d46
children d9da93cfe39c
files usr/src/cmd/halt/halt.c usr/src/man/man1m/halt.1m
diffstat 2 files changed, 9 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/cmd/halt/halt.c	Sat Jul 27 10:51:50 2013 -0700
+++ b/usr/src/cmd/halt/halt.c	Fri Jul 26 18:53:37 2013 -0700
@@ -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 @@
 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 @@
 			qflag = 1;
 			break;
 		case 'y':
-			ttyn = NULL;
+			/*
+			 * Option ignored for backwards compatibility.
+			 */
 			break;
 		case 'f':
 			fast_reboot = 1;
@@ -1448,19 +1451,6 @@
 		(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;
--- a/usr/src/man/man1m/halt.1m	Sat Jul 27 10:51:50 2013 -0700
+++ b/usr/src/man/man1m/halt.1m	Fri Jul 26 18:53:37 2013 -0700
@@ -1,9 +1,10 @@
 '\" te
 .\" Copyright (c) 2004 Sun Microsystems, Inc. All Rights Reserved.
+.\" Copyright (c) 2013, Joyent, Inc. All rights reserved.
 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH HALT 1M "Nov 2, 2004"
+.TH HALT 1M "Jul 26, 2013"
 .SH NAME
 halt, poweroff \- stop the processor
 .SH SYNOPSIS
@@ -77,7 +78,7 @@
 \fB\fB-y\fR\fR
 .ad
 .RS 6n
-Halt the system, even from a dialup terminal.
+This option is ignored for backwards compatibility.
 .RE
 
 .SH FILES