chiark / gitweb /
tests: udev - assume /etc/machine-id rather than /etc/hosts
authorTom Gundersen <teg@jklm.no>
Thu, 11 Dec 2014 13:17:35 +0000 (14:17 +0100)
committerTom Gundersen <teg@jklm.no>
Thu, 11 Dec 2014 13:17:35 +0000 (14:17 +0100)
On todays machines /etc/hosts is not mandatory. /etc/machine-id is though, so let's rely on that instead.

This makes the udev tests pass again for me.

test/udev-test.pl

index 3e05b61..d9b7967 100755 (executable)
@@ -1233,8 +1233,8 @@ EOF
                 devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
                 exp_name        => "there",
                 rules           => <<EOF
-TEST=="/etc/hosts", SYMLINK+="there"
-TEST!="/etc/hosts", SYMLINK+="notthere"
+TEST=="/etc/machine-id", SYMLINK+="there"
+TEST!="/etc/machine-id", SYMLINK+="notthere"
 EOF
         },
         {