LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1320|回复: 13

谁来挑战一下SuSE下的 hal 策略?

[复制链接]
发表于 2005-7-3 23:10:36 | 显示全部楼层 |阅读模式
在默认的情况下,SuSE 9.3会自动挂载移动设备,包括U盘、相机等等。但是,默认的设置不能够正常的显示移动设备(比如U盘)里的中文文件名。这和 hal 的策略有关。

现在我把suse 9.3和ubuntu 的默认存储设备策略亮出来。(安装我的经验,ubuntu下挂载U盘没有乱码的问题)所以,如果你有兴趣的话,不妨来挑战一下,分析一个明白:究竟怎样的策略才是最合适的。

这就要搜索资料,仔细阅读,比较分析和进行实验。不是很难,但也不容易,还是有点挑战性的。

SuSE 9.3
  1. <?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->

  2. <deviceinfo version="0.2">

  3.   <!-- Default policies merged onto computer root object  -->
  4.   <device>
  5.     <match key="info.udi" string="/org/freedesktop/Hal/devices/computer">
  6.       <merge key="storage.policy.default.mount_root" type="string">/media</merge>
  7.       <merge key="storage.policy.default.use_managed_keyword" type="bool">true</merge>
  8.       <merge key="storage.policy.default.managed_keyword.primary" type="string">managed</merge>
  9.       <merge key="storage.policy.default.managed_keyword.secondary" type="string">kudzu</merge>
  10.       <merge key="storage.policy.default.mount_option.noauto" type="bool">true</merge>
  11.       <merge key="storage.policy.default.mount_option.pamconsole" type="bool">true</merge>
  12.       <merge key="storage.policy.default.mount_option.exec" type="bool">true</merge>
  13.     </match>
  14.   </device>

  15.   <device>
  16.     <!-- Whitelist bus types of storage devices we care about  -->
  17.     <match key="info.category" string="storage">
  18.       <match key="storage.bus" string="usb">
  19.         <merge key="storage.policy.should_mount" type="bool">true</merge>      
  20.       </match>
  21.       <match key="storage.bus" string="ide">
  22.         <merge key="storage.policy.should_mount" type="bool">true</merge>
  23.       </match>
  24.       <match key="storage.bus" string="ieee1394">
  25.         <merge key="storage.policy.should_mount" type="bool">true</merge>
  26.       </match>
  27.       <match key="storage.bus" string="sata">
  28.         <merge key="storage.policy.should_mount" type="bool">true</merge>
  29.         <!-- temporary disable polling on SATA devices to avoid a kernel crash -->
  30.         <merge key="storage.media_check_enabled" type="bool">false</merge>
  31.       </match>
  32.       <match key="storage.bus" string="platform">
  33.         <merge key="storage.policy.should_mount" type="bool">true</merge>
  34.       </match>
  35.     </match>
  36.     <!-- Also add SCSI optical drives -->
  37.     <match key="storage.bus" string="scsi">
  38.       <match key="storage.drive_type" string="cdrom">
  39.         <merge key="storage.policy.should_mount" type="bool">true</merge>
  40.       </match>
  41.     </match>

  42.     <!-- Handle drives with non-partitioned media  -->
  43.     <match key="storage.no_partitions_hint" bool="true">
  44.       <!-- optical drives -->
  45.       <match key="storage.drive_type" string="cdrom">
  46.         <merge key="storage.policy.should_mount" type="bool">true</merge>      
  47.         <merge key="storage.policy.mount_filesystem" type="string">auto</merge>
  48.         <merge key="storage.policy.desired_mount_point" type="string">cdrom</merge>
  49.         <match key="storage.cdrom.cdr" bool="true">
  50.           <merge key="storage.policy.desired_mount_point" type="string">cdrecorder</merge>
  51.         </match>
  52.         <match key="storage.cdrom.cdrw" bool="true">
  53.           <merge key="storage.policy.desired_mount_point" type="string">cdrecorder</merge>
  54.         </match>
  55.         <match key="storage.cdrom.dvdplusr" bool="true">
  56.           <merge key="storage.policy.desired_mount_point" type="string">cdrecorder</merge>
  57.         </match>
  58.         <match key="storage.cdrom.dvdplusrw" bool="true">
  59.           <merge key="storage.policy.desired_mount_point" type="string">cdrecorder</merge>
  60.         </match>
  61.         <match key="storage.cdrom.dvdram" bool="true">
  62.           <merge key="storage.policy.desired_mount_point" type="string">cdrecorder</merge>
  63.         </match>
  64.         <match key="storage.cdrom.dvdr" bool="true">
  65.           <merge key="storage.policy.desired_mount_point" type="string">cdrecorder</merge>
  66.         </match>
  67.         <match key="storage.cdrom.dvdrw" bool="true">
  68.           <merge key="storage.policy.desired_mount_point" type="string">cdrecorder</merge>
  69.         </match>
  70.         <match key="/org/freedesktop/Hal/devices/computer:linux.is_selinux_enabled" bool="true">
  71.           <merge key="storage.policy.mount_option.fscontext=system_u:object_r:removable_t" type="bool">true</merge>
  72.         </match>
  73.       </match>

  74.       <!-- floppy drives -->
  75.       <match key="storage.drive_type" string="floppy">
  76.         <merge key="storage.policy.mount_filesystem" type="string">auto</merge>
  77.         <merge key="storage.policy.desired_mount_point" type="string">floppy</merge>
  78.         <merge key="storage.policy.should_mount" type="bool">true</merge>      
  79.         <match key="/org/freedesktop/Hal/devices/computer:linux.is_selinux_enabled" bool="true">
  80.           <merge key="storage.policy.mount_option.fscontext=system_u:object_r:removable_t" type="bool">true</merge>
  81.         </match>
  82.       </match>

  83.       <!-- zip drives -->
  84.       <match key="storage.drive_type" string="zip">
  85.         <merge key="storage.policy.mount_filesystem" type="string">auto</merge>
  86.         <merge key="storage.policy.desired_mount_point" type="string">zip</merge>
  87.         <match key="/org/freedesktop/Hal/devices/computer:linux.is_selinux_enabled" bool="true">
  88.           <merge key="storage.policy.mount_option.fscontext=system_u:object_r:removable_t" type="bool">true</merge>
  89.         </match>
  90.       </match>

  91.       <!-- jaz drives -->
  92.       <match key="storage.drive_type" string="jaz">
  93.         <merge key="storage.policy.mount_filesystem" type="string">auto</merge>
  94.         <merge key="storage.policy.desired_mount_point" type="string">jaz</merge>
  95.         <match key="/org/freedesktop/Hal/devices/computer:linux.is_selinux_enabled" bool="true">
  96.           <merge key="storage.policy.mount_option.fscontext=system_u:object_r:removable_t" type="bool">true</merge>
  97.         </match>
  98.       </match>
  99.     </match>

  100.     <!-- Normal volumes; use volume label, uuid or drive_type -->
  101.     <match key="block.is_volume" bool="true">
  102.       <match key="volume.fsusage" string="filesystem">
  103.         <match key="volume.is_disc" bool="true">
  104.           <merge key="volume.policy.should_mount" type="bool">true</merge>
  105.           <merge key="volume.policy.mount_filesystem" type="copy_property">volume.fstype</merge>

  106.           <!-- Fallback is '<storage.bus>', appended with 'disk', e.g. usbdisk, idedisk, scsidisk etc. -->
  107.           <merge key="volume.policy.desired_mount_point" type="copy_property">@block.storage_device:storage.bus</merge>
  108.           <append key="volume.policy.desired_mount_point" type="string">disk</append>
  109.           <!-- Best: If available use filesystem label -->
  110.           <match key="volume.label" empty="false">
  111.             <!-- unless it's a path (e.g. /boot, /, /home etc) -->
  112.             <match key="volume.label" is_absolute_path="false">
  113.               <!-- and only if the label is ascii -->
  114.               <match key="volume.label" is_ascii="true">
  115.                 <merge key="volume.policy.desired_mount_point" type="copy_property">volume.label</merge>
  116.               </match>
  117.             </match>
  118.           </match>
  119.         </match>

  120.         <!-- skip for drives with the no partitions hint (they are handled above) -->
  121.         <match key="@block.storage_device:storage.no_partitions_hint" bool="false">

  122.           <merge key="volume.policy.should_mount" type="bool">true</merge>
  123.           <merge key="volume.policy.mount_filesystem" type="copy_property">volume.fstype</merge>
  124.           
  125.           <!-- Fallback is '<storage.bus>', appended with 'disk', e.g. usbdisk,
  126.                idedisk, scsidisk etc. -->
  127.           <merge key="volume.policy.desired_mount_point" type="copy_property">@block.storage_device:storage.bus</merge>
  128.           <append key="volume.policy.desired_mount_point" type="string">disk</append>

  129.          <!-- zip drives -->
  130.          <match key="storage.drive_type" string="zip">
  131.            <merge key="storage.policy.desired_mount_point" type="string">zip</merge>
  132.          </match>
  133.           
  134.           <!-- Best: If available use filesystem label -->
  135.           <match key="volume.label" empty="false">
  136.             <!-- unless it's a path (e.g. /boot, /, /home etc) -->
  137.             <match key="volume.label" is_absolute_path="false">
  138.               <!-- and only if the label is ascii -->
  139.               <match key="volume.label" is_ascii="true">
  140.                 <merge key="volume.policy.desired_mount_point" type="copy_property">volume.label</merge>
  141.               </match>
  142.             </match>
  143.           </match>
  144.           
  145.           <!-- Should never mount Apple Bootstrap partitions (it would be
  146.                a security hole) - should use the bootable flag from the
  147.                Mac partition table instead -->
  148.           <match key="volume.fstype" string="hfs">
  149.             <match key="volume.label" string="bootstrap">
  150.               <merge key="volume.policy.should_mount" type="bool">false</merge>
  151.             </match>
  152.           </match>
  153.           
  154.           <!-- Use selinux mount options for hotpluggable and removable
  155.                volumes -->
  156.           <match key="/org/freedesktop/Hal/devices/computer:linux.is_selinux_enabled" bool="true">
  157.             <match key="@block.storage_device:storage.hotpluggable" bool="true">
  158.               <merge key="volume.policy.mount_option.fscontext=system_u:object_r:removable_t" type="bool">true</merge>
  159.             </match>
  160.             <match key="@block.storage_device:storage.removable" bool="true">
  161.               <merge key="volume.policy.mount_option.fscontext=system_u:object_r:removable_t" type="bool">true</merge>
  162.             </match>
  163.           </match>

  164.           <!-- Use noatime and sync options for all hotpluggable or removable
  165.                volumes smaller than 2GB -->
  166.           <match key="volume.size" compare_lt="2147483648">
  167.             <match key="@block.storage_device:storage.hotpluggable" bool="true">
  168.               <merge key="volume.policy.mount_option.sync" type="bool">true</merge>
  169.               <merge key="volume.policy.mount_option.noatime" type="bool">true</merge>
  170.             </match>
  171.             <match key="@block.storage_device:storage.removable" bool="true">
  172.               <merge key="volume.policy.mount_option.sync" type="bool">true</merge>
  173.               <merge key="volume.policy.mount_option.noatime" type="bool">true</merge>
  174.             </match>
  175.           </match>

  176.           <!-- Use UTF-8 charset for vfat -->
  177.           <match key="volume.fstype" string="vfat">
  178.             <merge key="volume.policy.mount_option.iocharset=utf8" type="bool">true</merge>
  179.           </match>
  180.           
  181.           <!-- whitelist of partition table id's, if from a msdos partition table -->
  182.           <match key="volume.partition.msdos_part_table_type" exists="true">
  183.             <!-- Default to no mount and punch holes -->
  184.             <merge key="volume.policy.should_mount" type="bool">false</merge>
  185.             <!-- Linux -->
  186.             <match key="volume.partition.msdos_part_table_type" int="0x83">
  187.               <merge key="volume.policy.should_mount" type="bool">true</merge>
  188.             </match>
  189.             <!-- FAT12 -->
  190.             <match key="volume.partition.msdos_part_table_type" int="0x01">
  191.               <merge key="volume.policy.should_mount" type="bool">true</merge>
  192.             </match>
  193.             <!-- FAT16 <32M -->
  194.             <match key="volume.partition.msdos_part_table_type" int="0x04">
  195.               <merge key="volume.policy.should_mount" type="bool">true</merge>
  196.             </match>
  197.             <!-- FAT16 -->
  198.             <match key="volume.partition.msdos_part_table_type" int="0x06">
  199.               <merge key="volume.policy.should_mount" type="bool">true</merge>
  200.             </match>
  201.             <!-- HPFS/NTFS -->
  202.             <match key="volume.partition.msdos_part_table_type" int="0x07">
  203.               <merge key="volume.policy.should_mount" type="bool">true</merge>
  204.             </match>
  205.             <!-- W95 FAT32 -->
  206.             <match key="volume.partition.msdos_part_table_type" int="0x0b">
  207.               <merge key="volume.policy.should_mount" type="bool">true</merge>
  208.             </match>
  209.             <!-- W95 FAT32 (LBA) -->
  210.             <match key="volume.partition.msdos_part_table_type" int="0x0c">
  211.               <merge key="volume.policy.should_mount" type="bool">true</merge>
  212.             </match>
  213.             <!-- W95 FAT16 (LBA) -->
  214.             <match key="volume.partition.msdos_part_table_type" int="0x0e">
  215.               <merge key="volume.policy.should_mount" type="bool">true</merge>
  216.             </match>
  217.           </match>          
  218.         </match>
  219.       </match>
  220.     </match>
  221.    
  222.   </device>

  223.   <!-- Dont want to mount non-hotpluggable fixed disks since ideraid
  224.        detection isnt complete as hald wrongly detects e.g. partitions
  225.        from some IDE RAID controllers -->
  226.   <device>
  227.     <match key="storage.hotpluggable" bool="false">
  228.       <match key="storage.removable" bool="false">
  229.         <merge key="storage.policy.should_mount" type="bool">false</merge>
  230.       </match>
  231.     </match>
  232.   </device>

  233. </deviceinfo>
复制代码


Ubuntu
  1. <?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->

  2. <deviceinfo version="0.2">

  3.   <!-- Default policies merged onto computer root object  -->
  4.   <device>
  5.     <match key="info.udi" string="/org/freedesktop/Hal/devices/computer">
  6.       <merge key="storage.policy.default.mount_root" type="string">/media</merge>
  7.       <merge key="storage.policy.default.use_managed_keyword" type="bool">false</merge>
  8.       <merge key="storage.policy.default.managed_keyword.primary" type="string">comment=fstabsync</merge>
  9.       <merge key="storage.policy.default.managed_keyword.secondary" type="string">managed</merge>
  10.       <merge key="storage.policy.default.mount_option.noauto" type="bool">true</merge>
  11.       <merge key="storage.policy.default.mount_option.user" type="bool">true</merge>
  12.       <merge key="storage.policy.default.mount_option.exec" type="bool">true</merge>
  13.     </match>
  14.   </device>

  15.   <device>
  16.     <!-- Whitelist bus types of storage devices we care about  -->
  17.     <match key="info.category" string="storage">
  18.       <match key="storage.bus" string="mmc">
  19.         <merge key="storage.policy.should_mount" type="bool">true</merge>      
  20.       </match>
  21.       <match key="storage.bus" string="usb">
  22.         <merge key="storage.policy.should_mount" type="bool">true</merge>      
  23.       </match>
  24.       <match key="storage.bus" string="ide">
  25.         <merge key="storage.policy.should_mount" type="bool">true</merge>
  26.       </match>
  27.       <match key="storage.bus" string="ieee1394">
  28.         <merge key="storage.policy.should_mount" type="bool">true</merge>
  29.       </match>
  30.       <match key="storage.bus" string="sata">
  31.         <merge key="storage.policy.should_mount" type="bool">true</merge>
  32.       </match>
  33.       <match key="storage.bus" string="platform">
  34.         <merge key="storage.policy.should_mount" type="bool">true</merge>
  35.       </match>
  36.     </match>
  37.     <!-- Also add SCSI optical drives -->
  38.     <match key="storage.bus" string="scsi">
  39.       <match key="storage.drive_type" string="cdrom">
  40.         <merge key="storage.policy.should_mount" type="bool">true</merge>
  41.       </match>
  42.     </match>

  43.     <!-- Handle drives with non-partitioned media  -->
  44.     <match key="storage.no_partitions_hint" bool="true">
  45.       <!-- optical drives -->
  46.       <match key="storage.drive_type" string="cdrom">
  47.         <merge key="storage.policy.mount_filesystem" type="string">auto</merge>
  48.         <merge key="storage.policy.desired_mount_point" type="string">cdrom</merge>
  49.         <match key="storage.cdrom.cdr" bool="true">
  50.           <merge key="storage.policy.desired_mount_point" type="string">cdrecorder</merge>
  51.         </match>
  52.         <match key="storage.cdrom.cdrw" bool="true">
  53.           <merge key="storage.policy.desired_mount_point" type="string">cdrecorder</merge>
  54.         </match>
  55.         <match key="storage.cdrom.dvdplusr" bool="true">
  56.           <merge key="storage.policy.desired_mount_point" type="string">cdrecorder</merge>
  57.         </match>
  58.         <match key="storage.cdrom.dvdplusrw" bool="true">
  59.           <merge key="storage.policy.desired_mount_point" type="string">cdrecorder</merge>
  60.         </match>
  61.         <match key="storage.cdrom.dvdram" bool="true">
  62.           <merge key="storage.policy.desired_mount_point" type="string">cdrecorder</merge>
  63.         </match>
  64.         <match key="storage.cdrom.dvdr" bool="true">
  65.           <merge key="storage.policy.desired_mount_point" type="string">cdrecorder</merge>
  66.         </match>
  67.         <match key="storage.cdrom.dvdrw" bool="true">
  68.           <merge key="storage.policy.desired_mount_point" type="string">cdrecorder</merge>
  69.         </match>
  70.       </match>

  71.       <!-- floppy drives -->
  72.       <match key="storage.drive_type" string="floppy">
  73.         <merge key="storage.policy.mount_filesystem" type="string">auto</merge>
  74.         <merge key="storage.policy.desired_mount_point" type="string">floppy</merge>
  75.       </match>

  76.       <!-- zip drives -->
  77.       <match key="storage.drive_type" string="zip">
  78.         <merge key="storage.policy.mount_filesystem" type="string">auto</merge>
  79.         <merge key="storage.policy.desired_mount_point" type="string">zip</merge>
  80.       </match>

  81.       <!-- jaz drives -->
  82.       <match key="storage.drive_type" string="jaz">
  83.         <merge key="storage.policy.mount_filesystem" type="string">auto</merge>
  84.         <merge key="storage.policy.desired_mount_point" type="string">jaz</merge>
  85.       </match>
  86.     </match>

  87.     <!-- Normal volumes; use volume label, uuid or drive_type -->
  88.     <match key="block.is_volume" bool="true">
  89.       <match key="volume.fsusage" string="filesystem">
  90.         <!-- skip for drives with the no partitions hint (they are handled above) -->
  91.         <match key="@block.storage_device:storage.no_partitions_hint" bool="true">
  92.           <merge key="volume.policy.desired_mount_point" type="copy_property">@block.storage_device:storage.policy.desired_mount_point</merge>
  93.         </match>
  94.         <match key="@block.storage_device:storage.no_partitions_hint" bool="false">

  95.           <merge key="volume.policy.should_mount" type="bool">true</merge>
  96.           <merge key="volume.policy.mount_filesystem" type="copy_property">volume.fstype</merge>
  97.           
  98.           <!-- Fallback is '<storage.bus>', appended with 'disk', e.g. usbdisk,
  99.                idedisk, scsidisk etc. -->
  100.           <merge key="volume.policy.desired_mount_point" type="copy_property">@block.storage_device:storage.bus</merge>
  101.           <append key="volume.policy.desired_mount_point" type="string">disk</append>
  102.           
  103.           <!-- zip drives -->
  104.           <match key="@block.storage_device:storage.drive_type" string="zip">
  105.             <merge key="volume.policy.desired_mount_point" type="string">zip</merge>
  106.           </match>
  107.           
  108.           <!-- Best: If available use filesystem label -->
  109.           <match key="volume.label" empty="false">
  110.             <!-- unless it's a path (e.g. /boot, /, /home etc) -->
  111.             <match key="volume.label" is_absolute_path="false">
  112.               <!-- and only if the label is ascii -->
  113.               <match key="volume.label" is_ascii="true">
  114.                 <merge key="volume.policy.desired_mount_point" type="copy_property">volume.label</merge>
  115.               </match>
  116.             </match>
  117.           </match>
  118.           
  119.           <!-- Should never mount Apple Bootstrap partitions (it would be
  120.                a security hole) - should use the bootable flag from the
  121.                Mac partition table instead -->
  122.           <match key="volume.fstype" string="hfs">
  123.             <match key="volume.label" string="bootstrap">
  124.               <merge key="volume.policy.should_mount" type="bool">false</merge>
  125.             </match>
  126.           </match>
  127.           
  128.           <!-- Use noatime option for all hotpluggable or removable volumes
  129.                smaller than 2GB; disable sync since it wears out flash devices -->
  130.           <match key="volume.size" compare_lt="2147483648">
  131.             <match key="@block.storage_device:storage.hotpluggable" bool="true">
  132.               <merge key="volume.policy.mount_option.sync" type="bool">false</merge>
  133.               <merge key="volume.policy.mount_option.noatime" type="bool">true</merge>
  134.             </match>
  135.             <match key="@block.storage_device:storage.removable" bool="true">
  136.               <merge key="volume.policy.mount_option.sync" type="bool">false</merge>
  137.               <merge key="volume.policy.mount_option.noatime" type="bool">true</merge>
  138.             </match>
  139.           </match>
  140.           
  141.           <!-- Attempt mount point 'ipod' for iPod's -->
  142.           <match key="@block.storage_device:portable_audio_player.type" string="ipod">
  143.             <merge key="volume.policy.desired_mount_point" type="string">ipod</merge>
  144.           </match>
  145.           
  146.           <!-- whitelist of partition table id's, if from a msdos partition table -->
  147.           <match key="volume.partition.msdos_part_table_type" exists="true">
  148.             <!-- Default to no mount and punch holes -->
  149.             <merge key="volume.policy.should_mount" type="bool">false</merge>
  150.             <!-- Linux -->
  151.             <match key="volume.partition.msdos_part_table_type" int="0x83">
  152.               <merge key="volume.policy.should_mount" type="bool">true</merge>
  153.             </match>
  154.             <!-- FAT12 -->
  155.             <match key="volume.partition.msdos_part_table_type" int="0x01">
  156.               <merge key="volume.policy.should_mount" type="bool">true</merge>
  157.             </match>
  158.             <!-- FAT16 <32M -->
  159.             <match key="volume.partition.msdos_part_table_type" int="0x04">
  160.               <merge key="volume.policy.should_mount" type="bool">true</merge>
  161.             </match>
  162.             <!-- FAT16 -->
  163.             <match key="volume.partition.msdos_part_table_type" int="0x06">
  164.               <merge key="volume.policy.should_mount" type="bool">true</merge>
  165.             </match>
  166.             <!-- HPFS/NTFS -->
  167.             <match key="volume.partition.msdos_part_table_type" int="0x07">
  168.               <merge key="volume.policy.should_mount" type="bool">true</merge>
  169.             </match>
  170.             <!-- W95 FAT32 -->
  171.             <match key="volume.partition.msdos_part_table_type" int="0x0b">
  172.               <merge key="volume.policy.should_mount" type="bool">true</merge>
  173.             </match>
  174.             <!-- W95 FAT32 (LBA) -->
  175.             <match key="volume.partition.msdos_part_table_type" int="0x0c">
  176.               <merge key="volume.policy.should_mount" type="bool">true</merge>
  177.             </match>
  178.             <!-- W95 FAT16 (LBA) -->
  179.             <match key="volume.partition.msdos_part_table_type" int="0x0e">
  180.               <merge key="volume.policy.should_mount" type="bool">true</merge>
  181.             </match>
  182.           </match>          
  183.         </match>
  184.       </match>
  185.     </match>
  186.    
  187.   </device>
  188.   
  189.   <!-- Dont want to mount non-hotpluggable fixed disks since ideraid
  190.        detection isnt complete as hald wrongly detects e.g. partitions
  191.        from some IDE RAID controllers -->
  192.   <device>
  193.     <match key="storage.hotpluggable" bool="false">
  194.       <match key="storage.removable" bool="false">
  195.         <merge key="storage.policy.should_mount" type="bool">false</merge>
  196.       </match>
  197.     </match>
  198.   </device>
  199.   
  200.   <device>
  201.     <match key="storage.media_check_enabled" bool="true">
  202.       <append key="info.addons" type="strlist">hald-addon-storage</append>
  203.     </match>
  204.   </device>
  205.   
  206. </deviceinfo>
复制代码
 楼主| 发表于 2005-7-3 23:18:45 | 显示全部楼层
另外,如果你觉得上面的问题太简单的话。还有“附加题”哟。
SuSE 对待移动设备是“上的去,下不来”,没办法就只好直接拔下。
但是这是有问题的:最简单的案例是写入的操作没有同步执行,拔下后发现应该有的文件却没有。
同样的,在ubuntu的kde里面却有一个safely remove的选项,让人放心好多。
So, what is your solution? What is your idea?
怎样解决这个问题呢?
(有点难度吧?)
回复 支持 反对

使用道具 举报

发表于 2005-7-4 06:43:47 | 显示全部楼层
你放到基础理论版去比较好。

其实这个问题跟locale有关,这取决于发行版自己的locale。据我所知,Mandriva 2005是唯一一个可以在zh_CN.GB*和*.UTF-8中都实现无乱码挂载的发行版。
回复 支持 反对

使用道具 举报

发表于 2005-7-4 09:53:26 | 显示全部楼层
Post by 蓝铃
另外,如果你觉得上面的问题太简单的话。还有“附加题”哟。
SuSE 对待移动设备是“上的去,下不来”,没办法就只好直接拔下。
但是这是有问题的:最简单的案例是写入的操作没有同步执行,拔下后发现应该有的文件却没有。
同样的,在ubuntu的kde里面却有一个safely remove的选项,让人放心好多。
So, what is your solution? What is your idea?
怎样解决这个问题呢?
(有点难度吧?)


这事SUSE的设计。在SUSE里面所有可移动设备都是同步写入的。所以只要写入操作完成后,就可以直接拔下设备了。无须卸载。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-7-4 11:38:07 | 显示全部楼层
Post by james_su
这事SUSE的设计。在SUSE里面所有可移动设备都是同步写入的。所以只要写入操作完成后,就可以直接拔下设备了。无须卸载。

OK。
那么,第一个问题怎么解决呢?
中文全是?????呀。
回复 支持 反对

使用道具 举报

发表于 2005-7-4 13:15:43 | 显示全部楼层
Post by james_su
这事SUSE的设计。在SUSE里面所有可移动设备都是同步写入的。所以只要写入操作完成后,就可以直接拔下设备了。无须卸载。

-o sync 慢死了
回复 支持 反对

使用道具 举报

容易受伤的女人 该用户已被删除
发表于 2005-7-4 15:04:21 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

发表于 2005-7-4 18:51:59 | 显示全部楼层
Post by bbbush
-o sync 慢死了


安全第一。
回复 支持 反对

使用道具 举报

发表于 2005-7-4 18:53:26 | 显示全部楼层
Post by 容易受伤的女人
james,g69(william)说到的submount源代码的问题会不会在mirror上放出update?


不知道。不过可能不会了。因为在下一版的SUSE里面要使用全新的mount机制,到时候编码的问题怎么解决还不知道呢。现在的方案肯定不会再用了。
回复 支持 反对

使用道具 举报

发表于 2005-7-4 20:24:17 | 显示全部楼层
Post by 容易受伤的女人
james,g69(william)说到的submount源代码的问题会不会在mirror上放出update?


不知道。不过可能不会了。因为在下一版的SUSE里面要使用全新的mount机制,到时候编码的问题怎么解决还不知道呢。现在的方案肯定不会再用了。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表