changeset 14063:46608c197f46

3788 /etc/bootrc is defunct and should be removed Reviewed by: Garrett D'Amore <garrett@damore.org> Reviewed by: Richard Lowe <richlowe@richlowe.net> Reviewed by: Gary Mills <gary_mills@fastmail.fm>> Approved by: Richard Lowe <richlowe@richlowe.net>
author Piotr Jasiukajtis <estibi@me.com>
date Mon, 24 Jun 2013 10:05:21 -0500
parents 91abf1cc1546
children 30d0e1d5d16d
files usr/src/cmd/initpkg/Makefile usr/src/cmd/initpkg/bootrc usr/src/cmd/prtconf/prtconf.c usr/src/pkg/manifests/driver-network-platform.mf usr/src/uts/common/conf/param.c usr/src/uts/common/krtld/kobj_bootflags.c
diffstat 6 files changed, 4 insertions(+), 134 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/cmd/initpkg/Makefile	Mon Jun 24 13:08:44 2013 -0400
+++ b/usr/src/cmd/initpkg/Makefile	Mon Jun 24 10:05:21 2013 -0500
@@ -38,9 +38,7 @@
 SBINL=		rc5 rc6
 USRSBINF=	mountall shutdown umountall
 
-sparc_ETCTABS=
-i386_ETCTABS=	bootrc
-ETCTABS=	vfstab inittab nscd.conf security/crypt.conf $($(MACH)_ETCTABS)
+ETCTABS=	vfstab inittab nscd.conf security/crypt.conf
 
 DFSTAB=		dfstab
 SBINETC=	rcS mountall rc0 rc1 rc2 rc3 rc5 rc6 swapadd umountall
@@ -60,7 +58,6 @@
 $(ROOTETC)/vfstab		:= FILEMODE =	0644
 $(ROOTETC)/nscd.conf		:= FILEMODE =	0644
 $(ROOTETC)/security/crypt.conf	:= FILEMODE =	0644
-$(ROOTETC)/bootrc		:= FILEMODE =	0755
 $(ROOTDFSTAB)			:= FILEMODE =	0644
 $(ROOTSBIN)/mountall		:= FILEMODE =	0555
 $(ROOTUSRSBIN)/mountall		:= FILEMODE =	0555
--- a/usr/src/cmd/initpkg/bootrc	Mon Jun 24 13:08:44 2013 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (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]
-#
-# CDDL HEADER END
-#
-# initial properties, set during installation
-# NOTICE: bootpath and boot-args should be set by this point.
-#================================================================
-getprop bootpath bp
-getprop boot-args bootargs
-if .streq ( "${bootargs}"X , kernel/unixX )
-	set bootargs
-endif
-
-set ba0 bogus_response
-set cmd_err 0
-
-# display current defaults
-echo "                     <<< Current Boot Parameters >>>
-Boot path: ${bp}
-Boot args: ${bootargs}"
-
-#comment out following line if auto booting is not desired
-set boot_timeout 5
-
-# display initial boot prompt
-echo '
-Type    b [file-name] [boot-flags] <ENTER>      to boot with options
-or      i <ENTER>                               to enter boot interpreter
-or      <ENTER>                                 to boot with defaults'
-
-if ! .streq ( ${boot_timeout}X , X )
-	echo "
-                  <<< timeout in ${boot_timeout} seconds >>>"
-endif
-
-echo -n '
-Select (b)oot or (i)nterpreter: '
-
-# read response to boot prompt
-if .streq ( ${boot_timeout}X , X )
-	read  ba0 ba1 ba2 ba3 ba4 ba5 ba6 ba7 ba8
-else
-	readt ${boot_timeout} ba0 ba1 ba2 ba3 ba4 ba5 ba6 ba7 ba8
-endif
-
-# process response to boot prompt
-# i command
-if .streq ( ${ba0}X , iX )
-	echo 'Entering boot interpreter - type ctrl-d to resume boot'
-	console
-	if .streq ( ${bootfile}X , X )          # if bootfile not set
-		set bootfile $def_bootfile      # set to default
-	endif
-
-# b command
-elseif .streq ( ${ba0}X , bX ) || .streq ( ${ba0}X , bootX )
-	if .strneq ( ${ba1}X , \\- , 1 )        # if first arg is a flag
-						# save it in bootargs
-		set bootargs "$ba1 $ba2 $ba3 $ba4 $ba5 $ba6 $ba7 $ba8"
-		set bootfile $def_bootfile      # set default boot file
-	elseif ! .streq ( ${ba1}X , X )         # else if first arg is present
-		set bootfile $ba1               # set bootfile to it
-		set bootargs "$ba2 $ba3 $ba4 $ba5 $ba6 $ba7 $ba8"
-	else                                    # else
-		set bootfile $def_bootfile      # set default boot file
-	endif
-	setprop boot-args "$bootargs"
-
-# anything else
-else                                            # no command
-	if ! .streq ( ${ba0}X , X )
-		echo "invalid response: \"${ba0}\""
-		set cmd_err 1                   # user entered invalid response
-	endif
-	if .streq ( ${bootfile}X , X )          # if bootfile not set
-		set bootfile $def_bootfile      # set to default
-	endif
-endif
-
-# other stuff
-
-setprop whoami $bootfile
-
-# 'b', 'i', or <ENTER> are the only valid responses
-if ( ${cmd_err} == 1 )
-	source /etc/bootrc
-else
-	run $bootfile
-	echo "could not run ${bootfile}"
-	set bootfile
-	source /etc/bootrc
-endif
--- a/usr/src/cmd/prtconf/prtconf.c	Mon Jun 24 13:08:44 2013 -0400
+++ b/usr/src/cmd/prtconf/prtconf.c	Mon Jun 24 10:05:21 2013 -0500
@@ -341,8 +341,7 @@
 	ret = sysinfo(SI_HW_PROVIDER, hw_provider, sizeof (hw_provider));
 	/*
 	 * If 0 bytes are returned (the system returns '1', for the \0),
-	 * we're probably on x86, and there has been no si-hw-provider
-	 * set in /etc/bootrc, default to Oracle.
+	 * we're probably on x86, default to Oracle.
 	 */
 	if (ret <= 1) {
 		(void) strncpy(hw_provider, "Oracle Corporation",
--- a/usr/src/pkg/manifests/driver-network-platform.mf	Mon Jun 24 13:08:44 2013 -0400
+++ b/usr/src/pkg/manifests/driver-network-platform.mf	Mon Jun 24 10:05:21 2013 -0500
@@ -50,7 +50,6 @@
     alias=pci1109,1400 \
     alias=pci1109,2400 \
     alias=pci2646,1
-file path=etc/bootrc group=sys mode=0755
 file path=etc/mach group=sys original_name=SUNWos86r:etc/mach preserve=true
 file path=kernel/drv/$(ARCH64)/dnet group=sys
 file path=kernel/drv/dnet group=sys
--- a/usr/src/uts/common/conf/param.c	Mon Jun 24 13:08:44 2013 -0400
+++ b/usr/src/uts/common/conf/param.c	Mon Jun 24 10:05:21 2013 -0500
@@ -534,20 +534,12 @@
 
 #elif defined(__i386)
 
-/*
- * On x86 machines, read hw_serial, hw_provider and srpc_domain from
- * /etc/bootrc at boot time.
- */
 char architecture[] = "i386";
 char architecture_32[] = "i386";
 char hw_provider[SYS_NMLN] = "";
 
 #elif defined(__amd64)
 
-/*
- * On amd64 machines, read hw_serial, hw_provider and srpc_domain from
- * /etc/bootrc at boot time.
- */
 char architecture[] = "amd64";
 char architecture_32[] = "i386";
 char hw_provider[SYS_NMLN] = "";
--- a/usr/src/uts/common/krtld/kobj_bootflags.c	Mon Jun 24 13:08:44 2013 -0400
+++ b/usr/src/uts/common/krtld/kobj_bootflags.c	Mon Jun 24 10:05:21 2013 -0500
@@ -61,10 +61,7 @@
 
 #if defined(_OBP)
 	/*
-	 * x86: The boot scripts (i.e., /etc/bootrc) don't prepend the kernel
-	 * name to the boot arguments.  (And beware making it do so: if the
-	 * run-kernel command returns, it will loop, and you will end up with
-	 * multiple copies of the kernel name.)
+	 * Sparc only, _OBP isn't defined on x86 any more.
 	 */
 	if (cp[0] != '-') {
 		/* if user booted kadb or kmdb, load kmdb */
@@ -105,7 +102,7 @@
 		case 'F':
 			break;
 		case 'f':
-			(void)prom_setprop(prom_optionsnode(), "diag-level",
+			(void) prom_setprop(prom_optionsnode(), "diag-level",
 			    (char *)params.gos_optargp,
 			    params.gos_optarglen + 1);
 			break;