13 lines
196 B
Bash
13 lines
196 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
INTERFACE_NAME="$1"
|
||
|
|
||
|
dhcp=$(grep "iface ${INTERFACE_NAME} inet dhcp" /etc/network/interfaces 2>/dev/null)
|
||
|
|
||
|
if [ "$dhcp" != "" ];
|
||
|
then
|
||
|
echo "Enabled"
|
||
|
else
|
||
|
echo "Disabled"
|
||
|
fi
|