chiark / gitweb /
[PATCH] add SUBSYSTEM rule to catch all block devices and apply the disk permissions
[elogind.git] / test / udev-test.pl
index 8ee8ba5414698f35ce9846584e1bdf27e1dd7268..bc8c4560d35558fbbb0ed28833c39421406f1bf5 100644 (file)
@@ -187,6 +187,36 @@ EOF
 
 KERNEL="ttyUSB0", NAME="visor"
 
+EOF
+       },
+       {
+               desc            => "Handle backslashed multi lines in config file (and replace kernel name)",
+               subsys          => "tty",
+               devpath         => "/class/tty/ttyUSB0",
+               exp_name        => "visor" ,
+               conf            => <<EOF
+KERNEL="ttyUSB0", \\
+NAME="visor"
+
+EOF
+       },
+       {
+               desc            => "Handle stupid backslashed multi lines in config file (and replace kernel name)",
+               subsys          => "tty",
+               devpath         => "/class/tty/ttyUSB0",
+               exp_name        => "visor" ,
+               conf            => <<EOF
+
+#
+\\
+
+\\\\
+
+#\\
+
+KERNEL="ttyUSB0", \\
+       NAME="visor"
+
 EOF
        },
        {
@@ -506,7 +536,7 @@ EOF
                subsys          => "tty",
                devpath         => "/class/tty/tty33",
                exp_name        => "tty33",
-               exp_perms       => "0:0:0600",
+               exp_perms       => "0:0:0660",
                conf            => <<EOF
 KERNEL="tty33", NAME="tty33", OWNER="bad", GROUP="name"
 EOF
@@ -516,7 +546,7 @@ EOF
                subsys          => "block",
                devpath         => "/block/sda",
                exp_name        => "node",
-               exp_perms       => "5000::0600",
+               exp_perms       => "5000::0660",
                conf            => <<EOF
 BUS="scsi", KERNEL="sda", NAME="node", OWNER="5000"
 EOF
@@ -526,7 +556,7 @@ EOF
                subsys          => "block",
                devpath         => "/block/sda",
                exp_name        => "node",
-               exp_perms       => ":100:0600",
+               exp_perms       => ":100:0660",
                conf            => <<EOF
 BUS="scsi", KERNEL="sda", NAME="node", GROUP="100"
 EOF
@@ -566,7 +596,7 @@ EOF
                subsys          => "tty",
                devpath         => "/class/tty/ttyUSB0",
                exp_name        => "ttyUSB0",
-               exp_perms       => ":100:0600",
+               exp_perms       => ":100:0660",
                conf            => <<EOF
 KERNEL="ttyUSB[0-9]*", NAME="ttyUSB%n", GROUP="100"
 EOF
@@ -1185,7 +1215,7 @@ open CONF, ">$main_conf" || die "unable to create config file: $main_conf";
 print CONF "udev_root=\"$udev_root\"\n";
 print CONF "udev_db=\"$udev_db\"\n";
 print CONF "udev_rules=\"$conf_tmp\"\n";
-print CONF "default_mode=\"0600\"\n";
+print CONF "default_mode=\"0660\"\n";
 print CONF "default_owner=\"root\"\n";
 print CONF "default_group=\"root\"\n";
 close CONF;