Magellan Linux

Contents of /alx-src/branches/alxconf-060/bin/dhcp-identifier.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7963 - (show annotations) (download) (as text)
Wed Dec 9 10:34:58 2015 UTC (8 years, 4 months ago) by niro
File MIME type: application/x-sh
File size: 329 byte(s)
-fixed sometime broken dhcp identifier with windows 2012 ADS server
1 #!/bin/bash
2
3 iface="$1"
4
5 if [[ -n ${iface} ]]
6 then
7 if [ -e /sys/class/net/${iface}/address ]
8 then
9 identifier="$(cat /sys/class/net/${iface}/address)"
10 identifier="${identifier//:}"
11 fi
12 else
13 if [ -e /var/cache/dhcp/client-identifier ]
14 then
15 identifier="$(< /var/cache/dhcp/client-identifier)"
16 fi
17 fi
18
19 echo "${identifier}"

Properties

Name Value
svn:executable *