diff --git a/sys-fs/udev/files/move_tmp_persistent_rules-112-r1.sh b/sys-fs/udev/files/move_tmp_persistent_rules-112-r1.sh index 1a02597..bad8b5a 100755 --- a/sys-fs/udev/files/move_tmp_persistent_rules-112-r1.sh +++ b/sys-fs/udev/files/move_tmp_persistent_rules-112-r1.sh @@ -2,7 +2,23 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -. /etc/init.d/functions.sh +if test "`ps -p 1 -o comm=`" = "systemd"; then + SCRIPTNAME="$0" + + ebegin() { + logger -t "$SCRIPTNAME" "${@:1}" + } + + eend() { + local retval=$1 + if test $retval -ne 0; then + logger -t "$SCRIPTNAME" "Error return code $retval: ${@:2}" + exit $retval + fi + } +else + . /etc/init.d/functions.sh +fi # store persistent-rules that got created while booting # when / was still read-only @@ -22,4 +38,4 @@ store_persistent_rules() { store_persistent_rules -# vim:ts=4 +# vim:ts=4 sw=4 diff --git a/sys-fs/udev/files/net-130-r1.sh b/sys-fs/udev/files/net-130-r1.sh index af61870..b755069 100755 --- a/sys-fs/udev/files/net-130-r1.sh +++ b/sys-fs/udev/files/net-130-r1.sh @@ -5,6 +5,11 @@ # Copyright 2007 Roy Marples # Distributed under the terms of the GNU General Public License v2 +if test "`ps -p 1 -o comm=`" = "systemd"; then + logger -t "$0" "You are using systemd, exiting. (${@:1})" + exit +fi + IFACE=$1 ACTION=$2