From 75ebdd4751121d1cf9662d67c6562387f5c60cf2 Mon Sep 17 00:00:00 2001 From: sthen Date: Tue, 19 Jul 2016 08:28:03 +0000 Subject: [PATCH] In rcctl ls, skip all files with a '.' in the name, not just rc.subr; pkg_add renames files in this way when the checksums don't match at update or removal time. [[ ]] suggestion from guenther@ to avoid the messy "case" that I had in my first diff. Other feedback/suggestions from halex aja millert, ok halex@ aja@. --- usr.sbin/rcctl/rcctl.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/rcctl/rcctl.sh b/usr.sbin/rcctl/rcctl.sh index 48d250bdeed..e386e1dd1b1 100644 --- a/usr.sbin/rcctl/rcctl.sh +++ b/usr.sbin/rcctl/rcctl.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $OpenBSD: rcctl.sh,v 1.102 2016/06/19 15:00:37 ajacoutot Exp $ +# $OpenBSD: rcctl.sh,v 1.103 2016/07/19 08:28:03 sthen Exp $ # # Copyright (c) 2014, 2015 Antoine Jacoutot # Copyright (c) 2014 Ingo Schwarze @@ -53,7 +53,7 @@ ls_rcscripts() cd /etc/rc.d && set -- * for _s; do - [ "${_s}" = "rc.subr" ] && continue + [[ ${_s} = *.* ]] && continue [ ! -d "${_s}" ] && echo "${_s}" done } -- 2.20.1