X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=extras%2Frule_generator%2Fwrite_cd_rules;h=00382ada2fdbfc8c0a1414a29cc0c81736230cda;hb=ea69e8217b4ddb9b054b2d3bf18260e71102646f;hp=398cd2737b2c6aac12fcbd74d83e5a050fd0350d;hpb=de2dc210e5fa9ad2967c8f315259a69441936141;p=elogind.git diff --git a/extras/rule_generator/write_cd_rules b/extras/rule_generator/write_cd_rules index 398cd2737..00382ada2 100644 --- a/extras/rule_generator/write_cd_rules +++ b/extras/rule_generator/write_cd_rules @@ -4,12 +4,21 @@ # # It adds symlinks for optical drives based on the device class determined # by cdrom_id and used ID_PATH to identify the device. -# + # (C) 2006 Marco d'Itri # -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation version 2 of the License. +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . # debug, if UDEV_LOG= if [ -n "$UDEV_LOG" ]; then @@ -97,7 +106,7 @@ choose_rules_file link_num=$(find_next_available 'cdrom[0-9]*') -match="ENV{ID_CDROM}==\"?*\", $RULE" +match="SUBSYSTEM==\"block\", ENV{ID_CDROM}==\"?*\", $RULE" comment="$ID_MODEL ($ID_PATH)" @@ -108,6 +117,7 @@ comment="$ID_MODEL ($ID_PATH)" write_rule "$match" "dvd$link_num" [ "$ID_CDROM_DVD_R" -o "$ID_CDROM_DVD_RW" -o "$ID_CDROM_DVD_RAM" ] && \ write_rule "$match" "dvdrw$link_num" +echo >> $RULES_FILE unlock_rules_file