#!/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
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
-# $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.
;;
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
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
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
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