Browse Source

Strip ifAlias script.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
Maximilian Wilhelm 8 years ago
parent
commit
6be981c85f
1 changed files with 1 additions and 42 deletions
  1. 1 42
      snmpd/ifAlias

+ 1 - 42
snmpd/ifAlias

@@ -49,48 +49,7 @@ if [ "X${IFACE}" = "X" ]; then
 	echo noSuchName
 else
 	if_alias=""
-
-	# Try to figure out current Linux distribution to guess network configuration file
-	distro=""
-	if [ -x /usr/bin/distro ]; then
-		distro=$(distro | cut -d " " -f 1)
-	elif which lsb_release >/dev/null 2>/dev/null; then
-		distro="$(lsb_release -a 2>/dev/null | awk -F: '/^Distributor ID/ { print $2 }' | tr -d '[[:space:]]')"
-	fi
-
-	if [ "${distro}" ]; then
-		case "${distro}" in
-			Debian)
-				cnf="/etc/network/interfaces"
-				# TODO: Support /etc/network/interfaces.d/
-				;;
-
-			Gentoo)
-				cnf="/etc/conf.d/net"
-				;;
-
-			CentOS|RedHat|SuSE|Mandriva|Mandrake)
-				cnf="/etc/sysconfig/network-scripts/ifcfg-$IFACE"
-				;;
-
-			Archlinux)
-				cnf="/etc/conf.d/net-conf-$IFACE"
-				;;
-
-			*)
-				cnf=""
-				;;
-		esac
-	fi
-
-	if [ -n "$cnf" ]; then
-		if_alias=$(grep -i "^# $IFACE:" "${cnf}" | sed "s/^# $IFACE: //i")
-	fi
-
-	if [ ! "${if_alias}" -a -f "${ALIASES_FILE}" ]; then
-		if_alias=$(grep -i "^$IFACE:" "${ALIASES_FILE}" | sed -e "s/^$IFACE:[[:space:]]*//")
-	fi
-
+	# Generic magic removed.
 
 	# FFHO local
 	case "${IFACE}" in