[Git][debian-edu/debian-edu-config][personal/sunweaver/update-hostname-from-ip-iproute2] 3 commits: testsuite/network: Stop using net-tools, use ip from iproute2 instead
"Daniel Teichmann (@dzatoah)" <[email protected]>
| Newsgroups | gmane.linux.skolelinux.cvs |
|---|---|
| Message-ID | <[email protected]> |
Daniel Teichmann pushed to branch personal/sunweaver/update-hostname-from-ip-iproute2 at Debian Edu / debian-edu-config
Commits:
6f1466b2 by Daniel Teichmann at 2026-08-19T13:57:27+02:00
testsuite/network: Stop using net-tools, use ip from iproute2 instead
- - - - -
5ebc61ad by Daniel Teichmann at 2026-08-19T13:57:27+02:00
ldap-tools/ldap-debian-edu-install: Get MAC addresses via ip link instead of ifconfig
- - - - -
26c8b2f0 by Daniel Teichmann at 2026-08-19T13:57:27+02:00
debian/control: Depend on iproute2
- - - - -
3 changed files:
- debian/control
- ldap-tools/ldap-debian-edu-install
- testsuite/network
Changes:
=====================================
debian/control
=====================================
@@ -31,6 +31,7 @@ Depends: ${misc:Depends},
education-tasks,
fping,
gnutls-bin,
+ iproute2,
iptables,
isenkram-cli,
ldap-utils,
=====================================
ldap-tools/ldap-debian-edu-install
=====================================
@@ -111,7 +111,7 @@ fi
################# password available now ##################
lookup_mac_addrs() {
- PATH=/sbin:$PATH LANG=C ifconfig 2>/dev/null | grep -i hwaddr | awk '{print $5}' | sort -u
+ LANG=C ip link | awk '/link\/ether/ { print $2 }' | sort -u
}
slapd_stop() {
=====================================
testsuite/network
=====================================
@@ -14,16 +14,11 @@ if test -r /etc/debian-edu/config ; then
. /etc/debian-edu/config
fi
-if [ -x /sbin/ifconfig ] ; then
- /sbin/ifconfig -a | sed "s%^%info: $0: ifconfig: %" || true
+if command -v ip >/dev/null ; then
+ ip addr | sed "s%^%info: $0: ip addr: %" || true
+ ip route | sed "s%^%info: $0: ip route: %" || true
else
- error "Unable to find /sbin/ifconfig"
-fi
-
-if [ -x /sbin/route ] ; then
- /sbin/route -n | sed "s%^%info: $0: route: %" || true
-else
- error "Unable to find /sbin/route"
+ error "Unable to find ip (iproute2)"
fi
if [ -x /usr/bin/nmap ] ; then
@@ -65,11 +60,7 @@ fi
######################################################################
have_interface() {
- if /sbin/ifconfig "$1" > /dev/null 2>&1 ; then
- true
- else
- false
- fi
+ ip link show "$1" > /dev/null 2>&1
}
for value in `echo $PROFILE |sed 's/ /-/g' | sed 's/,-/ /g'`; do
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/compare/f71d29c41124675f5b13a85cd1a8bc4fead6a921...26c8b2f0077391a7ae1ad9318be90f8b9bf3e01f
--
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/compare/f71d29c41124675f5b13a85cd1a8bc4fead6a921...26c8b2f0077391a7ae1ad9318be90f8b9bf3e01f
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
_______________________________________________
debian-edu-commits mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-edu-commits