base-files: ipcalc.sh: get rid of basename dependency

The netifd/dhcp flow uses this, and as uxc mounts netifd in a
container, this allows not mounting `basename` for just a usage.

References: https://github.com/openwrt/procd/pull/34
Suggested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Andre Heider <a.heider@gmail.com>
This commit is contained in:
Andre Heider 2026-04-23 10:38:06 +02:00 committed by Daniel Golle
parent 51de644a26
commit 2194ff572f

View File

@ -2,8 +2,6 @@
. /lib/functions/ipv4.sh
PROG="$(basename "$0")"
# wrapper to convert an integer to an address, unless we're using
# decimal output format.
# hook for library function
@ -21,7 +19,7 @@ _ip2str() {
}
usage() {
echo "Usage: $PROG [ -d | -x ] address/prefix [ start limit ]" >&2
echo "Usage: ${0##*/} [ -d | -x ] address/prefix [ start limit ]" >&2
exit 1
}