From 423d4fbe360a28df12789349bb8096d1e87f9c23 Mon Sep 17 00:00:00 2001 From: miod Date: Thu, 28 Jul 2022 16:06:04 +0000 Subject: [PATCH] Only attempt to set the yp domainname if not yet set; gets rid of an error message at shutdown. tweaks & ok deraadt@ --- etc/rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/rc b/etc/rc index d5c4543e5c0..c9996368c0c 100644 --- a/etc/rc +++ b/etc/rc @@ -1,4 +1,4 @@ -# $OpenBSD: rc,v 1.562 2022/07/27 23:06:50 deraadt Exp $ +# $OpenBSD: rc,v 1.563 2022/07/28 16:06:04 miod Exp $ # System startup script run by init on autoboot or after single-user. # Output and error are redirected to console by init, and the console is the @@ -312,7 +312,7 @@ if [[ -f /etc/myname ]]; then fi # Must set the domainname before rc.conf, so YP startup choices can be made. -if [[ -s /etc/defaultdomain ]]; then +if [[ -s /etc/defaultdomain && -z "$(sysctl -n kern.domainname)" ]]; then domainname "$(stripcom /etc/defaultdomain)" fi -- 2.20.1