#!/bin/ksh
-# $OpenBSD: install.sh,v 1.251 2014/07/21 20:43:00 naddy Exp $
+# $OpenBSD: install.sh,v 1.252 2014/07/22 06:45:31 ajacoutot 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
)
if grep -qs '^rtsol' /mnt/etc/hostname.*; then
- [[ ! -f /mnt/etc/sysctl.conf ]] && \
- echo "# created during install" >/mnt/etc/sysctl.conf
- echo 'net.inet6.icmp6.rediraccept=1 # 1=Accept IPv6 ICMP redirects (for hosts)' >>/mnt/etc/sysctl.conf
+ 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.
-# $OpenBSD: install.sub,v 1.784 2014/07/20 20:08:44 deraadt Exp $
+# $OpenBSD: install.sub,v 1.785 2014/07/22 06:45:31 ajacoutot Exp $
#
# Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback
# All rights reserved.
apply()
{
if [[ $sshd == n ]]; then
- echo "sshd_flags=NO # disabled during install" \
- >>/mnt/etc/rc.conf.local
+ echo "sshd_flags=NO" >>/mnt/etc/rc.conf.local
fi
if [[ $sshd_disableroot == y ]]; then
sed "/^#\(PermitRootLogin\) yes/s//\1 no/" \
cp /tmp/sshd_config /mnt/etc/ssh/sshd_config
fi
if [[ $ntpd == y ]]; then
- echo "ntpd_flags= # enabled during install" \
- >>/mnt/etc/rc.conf.local
+ echo "ntpd_flags=" >>/mnt/etc/rc.conf.local
[[ $ntpd_server == default ]] && ntpd_server=pool.ntp.org
- echo "# created during install\nservers ${ntpd_server%% *}" \
- >/mnt/etc/ntpd.conf
+ echo "servers ${ntpd_server%% *}" >>/mnt/etc/ntpd.conf
fi
if [[ -n $aperture ]]; then
- [[ ! -f /mnt/etc/sysctl.conf ]] && \
- echo "# created during install" >/mnt/etc/sysctl.conf
echo "machdep.allowaperture=$aperture # See xf86(4)" \
>>/mnt/etc/sysctl.conf
fi
if [[ -n $lidsuspend ]]; then
- [[ ! -f /mnt/etc/sysctl.conf ]] && \
- echo "# created during install" >/mnt/etc/sysctl.conf
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
- echo "xdm_flags= # enabled during install" \
- >>/mnt/etc/rc.conf.local
+ echo "xdm_flags=" >>/mnt/etc/rc.conf.local
fi
if [[ $defcons == y ]]; then