File: python3-ethtool.postinst

package info (click to toggle)
python-ethtool 0.14-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 328 kB
  • sloc: ansic: 1,770; python: 1,509; makefile: 24; sh: 16
file content (17 lines) | stat: -rw-r--r-- 621 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
set -e 

update-alternatives --quiet \
  --install /usr/sbin/pethtool pethtool /usr/sbin/pethtool3 20 \
  --slave /usr/share/man/man8/pethtool.8.gz pethtool.8.gz /usr/share/man/man8/pethtool3.8.gz

update-alternatives --quiet \
  --install /usr/sbin/pifconfig pifconfig /usr/sbin/pifconfig3 20 \
  --slave /usr/share/man/man8/pifconfig.8.gz pifconfig.8.gz /usr/share/man/man8/pifconfig3.8.gz
  
for badlink in /usr/man/man8/pifconfig.8 /usr/man/man8/pethtool.8; do
  if [ -L $badlink ]; then
    if ! ls -l $(ls -l $badlink | cut -d">" -f2) >/dev/null 2>&1; then
      rm -f $badlink; fi; fi; done

#DEBHELPER#