From cb56ec06400f4c2a741551d8dd1575f634d1f422 Mon Sep 17 00:00:00 2001 From: Patrik Olsson Date: Thu, 27 Apr 2023 15:44:09 +0200 Subject: [PATCH 1/2] Corrected call to logger in udhcpc default.script --- .../rootfs/usr/share/udhcpc/default.script | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/board/common/rootfs/usr/share/udhcpc/default.script b/board/common/rootfs/usr/share/udhcpc/default.script index f6c7e9d..71fa36a 100755 --- a/board/common/rootfs/usr/share/udhcpc/default.script +++ b/board/common/rootfs/usr/share/udhcpc/default.script @@ -60,7 +60,7 @@ stop_zcip() { } wait_for_ipv6_default_route() { - logger -it "$tag" -p daemon.info "$interface: waiting for IPv6 default route to appear ..." + logger -t "$tag" -p daemon.info "$interface: waiting for IPv6 default route to appear ..." while [ $IF_WAIT_DELAY -gt 0 ]; do if ip -6 route list 2>/dev/null | grep -q default; then return @@ -68,12 +68,12 @@ wait_for_ipv6_default_route() { sleep 1 : $((IF_WAIT_DELAY -= 1)) done - logger -it "$tag" -p daemon.info "$interface: IPv6 default route timeout!" + logger -t "$tag" -p daemon.info "$interface: IPv6 default route timeout!" } case "$ACTION" in deconfig) - logger -it "$tag" -p daemon.debug "$interface: initializing ..." + logger -t "$tag" -p daemon.debug "$interface: initializing ..." /sbin/ifconfig $interface up /sbin/ifconfig $interface 0.0.0.0 @@ -88,14 +88,14 @@ case "$ACTION" in ;; leasefail|nak) - logger -it "$tag" -p daemon.info "$interface: no response from DHCP server" + logger -t "$tag" -p daemon.info "$interface: no response from DHCP server" start_zcip ;; renew|bound) stop_zcip - logger -it "$tag" -p daemon.info "$interface: got DHCP lease $ip" + logger -t "$tag" -p daemon.info "$interface: got DHCP lease $ip" /sbin/ifconfig $interface $ip $BROADCAST $NETMASK if [ -n "$ipv6" ] ; then wait_for_ipv6_default_route @@ -105,7 +105,7 @@ case "$ACTION" in # Static Routes option and a Router option, the DHCP # client MUST ignore the Router option. if [ -n "$staticroutes" ]; then - logger -it "$tag" -p daemon.debug "$interface: deleting routers" + logger -t "$tag" -p daemon.debug "$interface: deleting routers" route -n | while read dest gw mask flags metric ref use iface; do [ "$iface" != "$interface" -o "$gw" = "0.0.0.0" ] || \ route del -net "$dest" netmask "$mask" gw "$gw" dev "$interface" @@ -118,7 +118,7 @@ case "$ACTION" in shift 2 done elif [ -n "$router" ] ; then - logger -it "$tag" -p daemon.debug "$interface: deleting routers" + logger -t "$tag" -p daemon.debug "$interface: deleting routers" while route del default gw 0.0.0.0 dev $interface 2> /dev/null; do : done @@ -146,7 +146,7 @@ case "$ACTION" in echo "search $search_list # $interface" >> $RESOLV_CONF for i in $dns ; do - logger -it "$tag" -p daemon.debug "$interface: adding dns $i" + logger -t "$tag" -p daemon.debug "$interface: adding dns $i" echo "nameserver $i # $interface" >> $RESOLV_CONF done ;; From d15deda829d5887a666fef8c6dec3d1df563ea21 Mon Sep 17 00:00:00 2001 From: Patrik Olsson Date: Thu, 27 Apr 2023 15:44:18 +0200 Subject: [PATCH 2/2] Corrected call to logger in zcip default.script --- board/common/rootfs/usr/share/zcip/default.script | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/board/common/rootfs/usr/share/zcip/default.script b/board/common/rootfs/usr/share/zcip/default.script index ed3c91f..2584412 100755 --- a/board/common/rootfs/usr/share/zcip/default.script +++ b/board/common/rootfs/usr/share/zcip/default.script @@ -16,7 +16,7 @@ cache="/var/cache/zcip-$interface.cache" # zcip should start on boot/resume and various media changes case "$1" in init) - logger -it "$tag" -p daemon.debug "$interface: initializing ..." + logger -t "$tag" -p daemon.debug "$interface: initializing ..." /sbin/ifconfig "$interface" up exit 0 ;; @@ -27,19 +27,19 @@ config) # remember $ip for $interface, to use on restart echo "$ip" > "$cache" - logger -it "$tag" -p daemon.info "$interface: setting address $ip" + logger -t "$tag" -p daemon.info "$interface: setting address $ip" exec ip address add dev "$interface" \ scope link local "$ip/16" broadcast + ;; deconfig) [ "x$ip" = "x" ] && exit 1 - logger -it "$tag" -p daemon.info "$interface: removing address $ip" + logger -t "$tag" -p daemon.info "$interface: removing address $ip" exec ip address del dev "$interface" local "$ip" ;; *) - logger -it "$tag" -p daemon.warn "$interface: uknown action $1" + logger -t "$tag" -p daemon.warn "$interface: uknown action $1" ;; esac