From 3277a91997b7e9a6b3166908093338d18089a212 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 25 Aug 2014 21:34:35 +0000 Subject: get rid of the tempfile in svc_default_enabled_flags(); feedback and ok ajacoutot@ --- usr.sbin/rcctl/rcctl.sh | 10 ++++------ 1 file 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 # @@ -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 } -- cgit v1.2.3