13 lines
196 B
Bash
Executable File
13 lines
196 B
Bash
Executable File
#!/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
|