ttys (256281) | ttys (260675) |
---|---|
1#!/bin/sh 2#- 3# Copyright (c) 2012-2013 Devin Teske 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 10 unchanged lines hidden (view full) --- 19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25# SUCH DAMAGE. 26# | 1#!/bin/sh 2#- 3# Copyright (c) 2012-2013 Devin Teske 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 10 unchanged lines hidden (view full) --- 19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25# SUCH DAMAGE. 26# |
27# $FreeBSD: stable/10/usr.sbin/bsdconfig/console/ttys 256181 2013-10-09 08:12:26Z dteske $ | 27# $FreeBSD: stable/10/usr.sbin/bsdconfig/console/ttys 260675 2014-01-15 07:36:34Z dteske $ |
28# 29############################################################ INCLUDES 30 31BSDCFG_SHARE="/usr/share/bsdconfig" 32. $BSDCFG_SHARE/common.subr || exit 1 33f_dprintf "%s: loading includes..." "$0" 34f_include $BSDCFG_SHARE/dialog.subr 35f_include $BSDCFG_SHARE/mustberoot.subr --- 72 unchanged lines hidden (view full) --- 108# 109ttys_set_type() 110{ 111 local consterm="$1" err 112 113 # 114 # Create new temporary file to write our ttys(5) update with new types. 115 # | 28# 29############################################################ INCLUDES 30 31BSDCFG_SHARE="/usr/share/bsdconfig" 32. $BSDCFG_SHARE/common.subr || exit 1 33f_dprintf "%s: loading includes..." "$0" 34f_include $BSDCFG_SHARE/dialog.subr 35f_include $BSDCFG_SHARE/mustberoot.subr --- 72 unchanged lines hidden (view full) --- 108# 109ttys_set_type() 110{ 111 local consterm="$1" err 112 113 # 114 # Create new temporary file to write our ttys(5) update with new types. 115 # |
116 local tmpfile="$( mktemp -t "pgm" )" | 116 local tmpfile="$( mktemp -t "$pgm" )" |
117 [ "$tmpfile" ] || return $FAILURE 118 119 # 120 # Fixup permissions and ownership (mktemp(1) creates the temporary file 121 # with 0600 permissions -- change the permissions and ownership to 122 # match ttys(5) before we write it out and mv(1) it into place). 123 # 124 local mode="$( stat -f '%#Lp' "$ETC_TTYS" 2> /dev/null )" --- 80 unchanged lines hidden --- | 117 [ "$tmpfile" ] || return $FAILURE 118 119 # 120 # Fixup permissions and ownership (mktemp(1) creates the temporary file 121 # with 0600 permissions -- change the permissions and ownership to 122 # match ttys(5) before we write it out and mv(1) it into place). 123 # 124 local mode="$( stat -f '%#Lp' "$ETC_TTYS" 2> /dev/null )" --- 80 unchanged lines hidden --- |