summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rcctl
diff options
context:
space:
mode:
authorsthen <sthen@openbsd.org>2016-07-19 08:28:03 +0000
committersthen <sthen@openbsd.org>2016-07-19 08:28:03 +0000
commit75ebdd4751121d1cf9662d67c6562387f5c60cf2 (patch)
tree1786de6f13c6a8a66fc51e4929950e5a2657ca6c /usr.sbin/rcctl
parentUse a flag to indicate that a packet has been received on an IPv6 (diff)
downloadwireguard-openbsd-75ebdd4751121d1cf9662d67c6562387f5c60cf2.tar.xz
wireguard-openbsd-75ebdd4751121d1cf9662d67c6562387f5c60cf2.zip
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@.
Diffstat (limited to 'usr.sbin/rcctl')
-rw-r--r--usr.sbin/rcctl/rcctl.sh4
1 files 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 <ajacoutot@openbsd.org>
# Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -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
}