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 3e05b61777aaf50d92f9fe796cb8a2b85dc32f41..d9b7967004414210bc5e11cefb20632b201c3f33 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
                 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
         },
         {
 EOF
         },
         {