diff options
-rw-r--r-- | distrib/miniroot/install.sh | 5 | ||||
-rw-r--r-- | distrib/miniroot/install.sub | 27 |
2 files changed, 12 insertions, 20 deletions
diff --git a/distrib/miniroot/install.sh b/distrib/miniroot/install.sh index 3a786529acb..bb8429f9cd0 100644 --- a/distrib/miniroot/install.sh +++ b/distrib/miniroot/install.sh @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sh,v 1.255 2014/08/10 14:59:22 rpe Exp $ +# $OpenBSD: install.sh,v 1.256 2014/08/10 16:32:28 rpe Exp $ # $NetBSD: install.sh,v 1.5.2.8 1996/08/27 18:15:05 gwr Exp $ # # Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback @@ -309,9 +309,8 @@ fi print -r -- "$rootkey" >> /mnt/root/.ssh/authorized_keys ) -if grep -qs '^rtsol' /mnt/etc/hostname.*; then +grep -qs '^rtsol' /mnt/etc/hostname.* && echo 'net.inet6.icmp6.rediraccept=1 # 1=Accept IPv6 ICMP redirects (for hosts)' >>/mnt/etc/sysctl.conf -fi # Perform final steps common to both an install and an upgrade. finish_up diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 35e7196553f..801023c095f 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.789 2014/08/09 21:51:29 halex Exp $ +# $OpenBSD: install.sub,v 1.790 2014/08/10 16:32:28 rpe Exp $ # # Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback # All rights reserved. @@ -945,9 +945,7 @@ v6_config() { ;; rtsol) [[ ! -x /sbin/rtsol ]] && { echo "No /sbin/rtsol."; return; } ifconfig $_ifs up - if rtsol -F $_ifs; then - echo "up\nrtsol" >>$_hn - fi + rtsol -F $_ifs && echo "up\nrtsol" >>$_hn return ;; esac @@ -1161,10 +1159,10 @@ install_files() { for _f in $THESETS; do isin $_f $_files || continue; _sets=$(addel $_f $_sets) - if [[ -z $DISPLAY && ! -d /mnt/etc/X11 ]]; then - # No displays and X isn't installed ==> skip X sets - isin ${_f%${VERSION}.tgz} xbase xetc xshare xfont xserv && continue - fi + # No displays and X isn't installed ==> skip X sets + [[ -z $DISPLAY && ! -d /mnt/etc/X11 ]] && + isin ${_f%${VERSION}.tgz} xbase xetc xshare xfont xserv && + continue isin $_f $DEFAULTSETS "site$VERSION-$(hostname -s).tgz" && _get_sets=$(addel $_f $_get_sets) done @@ -1797,9 +1795,7 @@ donetconfig() { apply() { - if [[ $sshd == n ]]; then - echo "sshd_flags=NO" >>/mnt/etc/rc.conf.local - fi + [[ $sshd == n ]] && echo "sshd_flags=NO" >>/mnt/etc/rc.conf.local if [[ $sshd_disableroot == y ]]; then sed "/^#\(PermitRootLogin\) yes/s//\1 no/" \ < /mnt/etc/ssh/sshd_config >/tmp/sshd_config @@ -1811,19 +1807,16 @@ apply() echo "servers ${ntpd_server%% *}" >>/mnt/etc/ntpd.conf fi - if [[ -n $aperture ]]; then + [[ -n $aperture ]] && echo "machdep.allowaperture=$aperture # See xf86(4)" \ >>/mnt/etc/sysctl.conf - fi - if [[ -n $lidsuspend ]]; then + [[ -n $lidsuspend ]] && echo "machdep.lidsuspend=1 # Try to suspend on lid close" \ >>/mnt/etc/sysctl.conf - fi - if [[ $xdm == y && -x /mnt/usr/X11R6/bin/xdm ]]; then + [[ $xdm == y && -x /mnt/usr/X11R6/bin/xdm ]] && echo "xdm_flags=" >>/mnt/etc/rc.conf.local - fi if [[ $defcons == y ]]; then cp /mnt/etc/ttys /tmp/ttys |