summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2014-08-25 21:34:35 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2014-08-25 21:34:35 +0000
commit3277a91997b7e9a6b3166908093338d18089a212 (patch)
treeea868a2d38b96f652407bf5389a35a45499dd509
parent26af4bd2d61b6690fb0e421b736ac843ff62847d (diff)
get rid of the tempfile in svc_default_enabled_flags();
feedback and ok ajacoutot@
-rw-r--r--usr.sbin/rcctl/rcctl.sh10
1 files changed, 4 insertions, 6 deletions
diff --git a/usr.sbin/rcctl/rcctl.sh b/usr.sbin/rcctl/rcctl.sh
index 880dc7a6be9..2c5abe19bb5 100644
--- a/usr.sbin/rcctl/rcctl.sh
+++ b/usr.sbin/rcctl/rcctl.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $OpenBSD: rcctl.sh,v 1.25 2014/08/25 21:06:46 ajacoutot Exp $
+# $OpenBSD: rcctl.sh,v 1.26 2014/08/25 21:34:34 schwarze Exp $
#
# Copyright (c) 2014 Antoine Jacoutot <ajacoutot@openbsd.org>
#
@@ -74,12 +74,10 @@ svc_default_enabled_flags()
{
local _svc=$1
[ -n "${_svc}" ] || return
- local _tmp=$(mktemp -t rcctl-deflags.XXXXXXXXXX) || exit 1
- echo "pkg_scripts=${_svc}" >${_tmp}
- echo "${_svc}_flags=" >>${_tmp}
- _rc_parse_conf /etc/rc.conf ${_tmp}
- rm ${_tmp}
+ _rc_parse_conf /etc/rc.conf
+ pkg_scripts=${_svc}
+ unset ${_svc}_flags
echo $(svc_get_flags ${_svc})
_rc_parse_conf
}