meta-digi-dey: fix systemd-cat not found in network scripts
This commit fixes the error message when specific network scripts are launched. Signed-off-by: Mike Engel <Mike.Engel@digi.com> https://jira.digi.com/browse/DEL-6728
This commit is contained in:
parent
82d2acc543
commit
3ac4ce1959
|
|
@ -19,7 +19,11 @@
|
|||
#
|
||||
|
||||
log() {
|
||||
systemd-cat -p "${1}" -t ifdownup printf "%s" "${2}"
|
||||
if type "systemd-cat" >/dev/null 2>/dev/null; then
|
||||
systemd-cat -p "${1}" -t ifdownup printf "%s" "${2}"
|
||||
else
|
||||
logger -p "${1}" -t ifdownup "${2}"
|
||||
fi
|
||||
}
|
||||
|
||||
log info "device-connectivity-change detected on interface ${DEVICE_IP_IFACE}"
|
||||
|
|
|
|||
|
|
@ -22,7 +22,11 @@
|
|||
[ "${CONNECTION_ID}" = "p2p-bridge" ] || exit 0
|
||||
|
||||
log() {
|
||||
systemd-cat -p "${1}" -t p2pbridge printf "%s" "${2}"
|
||||
if type "systemd-cat" >/dev/null 2>/dev/null; then
|
||||
systemd-cat -p "${1}" -t p2pbridge printf "%s" "${2}"
|
||||
else
|
||||
logger -p "${1}" -t p2pbridge "${2}"
|
||||
fi
|
||||
}
|
||||
|
||||
case "${NM_DISPATCHER_ACTION}" in
|
||||
|
|
|
|||
|
|
@ -30,7 +30,11 @@
|
|||
[ "${IFACE}" = "p2p0" ] || exit 0
|
||||
|
||||
log() {
|
||||
systemd-cat -p "${1}" -t p2plink printf "%s" "${2}"
|
||||
if type "systemd-cat" >/dev/null 2>/dev/null; then
|
||||
systemd-cat -p "${1}" -t p2plink printf "%s" "${2}"
|
||||
else
|
||||
logger -p "${1}" -t p2plink "${2}"
|
||||
fi
|
||||
}
|
||||
|
||||
# Exit without error if the peer MAC address is not available
|
||||
|
|
|
|||
|
|
@ -23,7 +23,11 @@
|
|||
WDOG_TIME_SEC=$((WATCHDOG_USEC / 1000000 / 4))
|
||||
|
||||
log() {
|
||||
systemd-cat -p "${1}" -t system-monitor printf "%s" "${2}"
|
||||
if type "systemd-cat" >/dev/null 2>/dev/null; then
|
||||
systemd-cat -p "${1}" -t system-monitor printf "%s" "${2}"
|
||||
else
|
||||
logger -p "${1}" -t system-monitor "${2}"
|
||||
fi
|
||||
}
|
||||
|
||||
checks_failed=0
|
||||
|
|
|
|||
Loading…
Reference in New Issue