chiark / gitweb /
rules_generator: remove "installation" function
[elogind.git] / extras / rule_generator / write_net_rules
index e7386b057ca87c59dfb0e113c18d4a53e5935172..b873b5bf8c5d68e2b9e351f41fad2a7089519917 100644 (file)
@@ -42,7 +42,7 @@ write_rule() {
        if [ "$PRINT_HEADER" ]; then
                PRINT_HEADER=
                echo "# This file was automatically generated by the $0"
        if [ "$PRINT_HEADER" ]; then
                PRINT_HEADER=
                echo "# This file was automatically generated by the $0"
-               echo "# program, probably run by the persistent-net-generator.rules rules file."
+               echo "# program run by the persistent-net-generator.rules rules file."
                echo "#"
                echo "# You can modify it, as long as you keep each rule on a single line."
        fi
                echo "#"
                echo "# You can modify it, as long as you keep each rule on a single line."
        fi
@@ -53,33 +53,6 @@ write_rule() {
        } >> $RULES_FILE
 }
 
        } >> $RULES_FILE
 }
 
-# used only if $RULES_FILE is empty, like on installation
-if [ "$1" = "all_interfaces" ]; then
-       if [ -e $RULES_FILE ]; then
-               printf "$RULES_FILE exists, persistent interface names\nnot saved.\n" >&2
-               exit 0
-       fi
-
-       if [ ! -e /sys/class/net/ ]; then
-               echo "/sys/class/net/ is not available, persistent interface names not saved." >&2
-               exit 0
-       fi
-
-       cd /sys/class/net/ || return 0
-
-       for INTERFACE in *; do
-               case $INTERFACE in
-               eth*|ath*|wlan*|ra*|sta*|ctc*|hsi*) ;;
-               *) continue ;;
-               esac
-
-               INTERFACE="$INTERFACE" DEVPATH="/class/net/$INTERFACE" \
-                       /lib/udev/write_net_rules || true
-       done
-
-       exit 0
-fi
-
 if [ -z "$INTERFACE" ]; then
        echo "Missing \$INTERFACE." >&2
        exit 1
 if [ -z "$INTERFACE" ]; then
        echo "Missing \$INTERFACE." >&2
        exit 1