Date: Fri, 8 Nov 2013 10:09:35 +0000 (UTC) From: Devin Teske <dteske@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257843 - head/usr.sbin/bsdinstall/scripts Message-ID: <201311081009.rA8A9Zrn025309@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dteske Date: Fri Nov 8 10:09:34 2013 New Revision: 257843 URL: http://svnweb.freebsd.org/changeset/base/257843 Log: Semi-revert this one file out of r257842. The ttys(5) stuff, as we discussed on -current, was not supposed to go in but get solved in a different way -- e.g., init(8) logic). Discussed on: -current Modified: head/usr.sbin/bsdinstall/scripts/config Modified: head/usr.sbin/bsdinstall/scripts/config ============================================================================== --- head/usr.sbin/bsdinstall/scripts/config Fri Nov 8 09:57:03 2013 (r257842) +++ head/usr.sbin/bsdinstall/scripts/config Fri Nov 8 10:09:34 2013 (r257843) @@ -27,81 +27,6 @@ # # $FreeBSD$ # -############################################################ CONFIGURATION - -# -# Location of ttys(5) -# -ETC_TTYS=/etc/ttys - -############################################################ FUNCTIONS - -# ttus_set_type $serterm -# -# Set terminal type of `ttyu*' and entries in ttys(5) to $serterm. -# -ttus_set_type() -{ - local serterm="$1" err - - # - # Create new temporary file to write our ttys(5) update with new types. - # - local tmpfile="$( mktemp -t "pgm" )" - [ "$tmpfile" ] || return $FAILURE - - # - # Fixup permissions and ownership (mktemp(1) creates the temporary file - # with 0600 permissions -- change the permissions and ownership to - # match ttys(5) before we write it out and mv(1) it into place). - # - local mode="$( stat -f '%#Lp' "$ETC_TTYS" 2> /dev/null )" - local owner="$( stat -f '%u:%g' "$ETC_TTYS" 2> /dev/null )" - f_quietly chmod "${mode:-0644}" "$tmpfile" - f_quietly chown "${owner:-root:wheel}" "$tmpfile" - - # - # Operate on ttys(5), replacing only the types of `ttyu*' terminals - # with the new type. - # - if ! err=$( awk -v serterm="$serterm" ' - BEGIN { - } - { - # "Skip" blank-lines, lines containing only whitespace, and - # lines containing only a comment or whitespace-then-comment. - # - if ( $0 ~ /^[[:space:]]*(#|$)/ ) { print; next } - - # "Skip" terminal types other than those supported - # - if ( $1 !~ /^ttyu.*$/ ) { print; next } - - # Change the terminal type to the new value and enable it - # - match($0, - /[[:alnum:]\.\+-_]+[[:space:]]+(on|off)([[:space:]]|$).*$/) - if ( ! RSTART ) { print; next } - start = RSTART - left=substr($0, 0, RSTART - 1) - right=substr($0, start) - match(right, - /[[:alnum:]\.\+-_]+[[:space:]]+(on|off)([[:space:]]+|$)/) - right=substr(right, RSTART + RLENGTH) - printf "%s%s on %s\n", left, serterm, right - } - ' "$ETC_TTYS" > "$tmpfile" 2>&1 ); then - f_show_err "%s" "$err" - return $FAILURE - fi - if ! err=$( mv -f "$tmpfile" "$ETC_TTYS" 2>&1 ); then - f_show_err "%s" "$err" - return $FAILURE - fi - - return $SUCCESS -} - ############################################################ MAIN cat $BSDINSTALL_TMPETC/rc.conf.* >> $BSDINSTALL_TMPETC/rc.conf @@ -117,8 +42,6 @@ cp $BSDINSTALL_TMPBOOT/* $BSDINSTALL_CHR # Set up other things from installed config chroot $BSDINSTALL_CHROOT /usr/bin/newaliases -kbdcontrol -d || ttus_set_type vt100 - ################################################################################ # END ################################################################################
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311081009.rA8A9Zrn025309>