If we're unsetting the SYSTEMD variable again this
might influence other code which sources lsb-functions.
Since we also have a single usage of systemd in lsb-functions
there's no need to use a variable at all
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
-if [ "$(cat /proc/1/comm 2>/dev/null)" = "systemd" ] ; then
- SYSTEMD=true
-else
- SYSTEMD=false
-fi
-
# log_*() functions {{{
TPUT="${TPUT:-"/usr/bin/tput"}"
}
#}}}
-# if we're using systemd then redfine functions for
-# output in systemd style
-if $SYSTEMD ; then
+# if we're using systemd then redefine functions
+# for output in systemd style
+if [ "$(cat /proc/1/comm 2>/dev/null)" = "systemd" ] ; then
einfo() {
printf "[ ${GREEN}OK${NORMAL} ] %s\n" "$*"
}
}
fi
-# don't expose unneeded local variables
-unset SYSTEMD
-
# vim: ft=sh tw=80 ts=4 foldmethod=marker