From 90250b93f0ed89946b266efbd8fc58f122165b3a Mon Sep 17 00:00:00 2001 From: ajacoutot Date: Wed, 16 Jul 2014 08:27:14 +0000 Subject: [PATCH] Add a comment at the top of sysctl.conf when it is created by the installer. ok deraadt@ rpe@ --- distrib/miniroot/install.sh | 6 ++++-- distrib/miniroot/install.sub | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/distrib/miniroot/install.sh b/distrib/miniroot/install.sh index 832d9594464..f53569691dc 100644 --- a/distrib/miniroot/install.sh +++ b/distrib/miniroot/install.sh @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sh,v 1.248 2014/07/15 08:49:50 deraadt Exp $ +# $OpenBSD: install.sh,v 1.249 2014/07/16 08:27:14 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 @@ -310,8 +310,10 @@ fi ) if grep -qs '^rtsol' /mnt/etc/hostname.*; then + [[ ! -f /mnt/etc/sysctl.conf ]] && \ + echo "# created during install" >/mnt/etc/sysctl.conf echo 'net.inet6.ip6.accept_rtadv=1 # 1=Permit IPv6 autoconf (forwarding must be 0)' >>/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. diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index bea4fb52106..ff70b8181b3 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.781 2014/07/15 08:49:50 deraadt Exp $ +# $OpenBSD: install.sub,v 1.782 2014/07/16 08:27:14 ajacoutot Exp $ # # Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback # All rights reserved. @@ -1815,6 +1815,8 @@ apply() 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 -- 2.20.1