Hallo
im thread
USB Festplatte wird beim Start (10.1) nicht gemounted
Von: David Geiger
# # allow / to build a tree structure, 20060628 73a76 # I want / !!!!!!!!!!!!!!!! 92c95,98 < GIVEN_MOUNTPOINT=${GIVEN_MOUNTPOINT//[^a-zA-Z0-9_+-]/_}
# original #GIVEN_MOUNTPOINT=${GIVEN_MOUNTPOINT//[^a-zA-Z0-9_+-]/_} GIVEN_MOUNTPOINT=${GIVEN_MOUNTPOINT//[^a-zA-Z0-9_+-/]_}
---new file -------------------------------------------------- ./usr/local/bin/mountsd-from-file #!/bin/sh #i mount all devices in temporary file /tmp/system-mountsd # with hal to get the mount-point defined by hal # consider key volume.policy.should_mount # # Problem is hal daemon is not active. Then the rest of the script will fail. # therefore all devices are written to /tmp/system-mountsd so that they # can be mounted later in run-level-5. # # # 20060627 a=`hal-find-by-property --key "block.device" --string /dev/$1` m=`hal-get-property --key volume.policy.desired_mount_point --udi $a` doMount=`hal-get-property --key volume.policy.should_mount --udi $a` if [ "${doMount}xx" = "truexx" ] then halmount "/dev/$1" "$m" fi ---new file -------------------------------------------------- ./usr/local/bin/mountsd #!/bin/sh #i mount a device with hal to get the mount-point defined by hal # consider key volume.policy.should_mount # # Problem is hal daemon is not active. Then the rest of the script will fail. # therefore all devices are written to /tmp/system-mountsd so that they # can be mounted later in run-level-5. # # # 20060627 touch /tmp/system-mountsd echo $1 >> /tmp/system-mountsd a=`hal-find-by-property --key "block.device" --string /dev/$1` m=`hal-get-property --key volume.policy.desired_mount_point --udi $a` doMount=`hal-get-property --key volume.policy.should_mount --udi $a` #here hal is working, remove the temporary file ##if [ -e /var/run/hal/haldaemon.pid ]; then rm /tmp/system-mountsd; fi if [ "${doMount}xx" = "truexx" ] then halmount "/dev/$1" "$m" fi ---new file -------------------------------------------------- ./usr/share/hal/fdi/policy/95pmahr-policy/05-wda-western-digital-1200-mountpoints.fdi <?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- --> <!-- -*- mount points wd1200, fixed device /dev/sdm, 20060328 -*- --> <deviceinfo version="0.2"> <!-- -*- sdm1 -*- --> <device> <match key="block.device" string="/dev/sdm1"> <merge key="volume.policy.should_mount" type="bool">true</merge> <merge key="volume.policy.desired_mount_point" type="string">wd1200/wd1200-p1</merge> <merge key="volume.policy.mount_option.sync" type="bool">false</merge> </match> </device> <!-- -*- sdm2 -*- --> <device> <match key="block.device" string="/dev/sdm2"> <merge key="volume.policy.should_mount" type="bool">true</merge> <merge key="volume.policy.desired_mount_point" type="string">wd1200/wd1200-p2</merge> <merge key="volume.policy.mount_option.sync" type="bool">false</merge> </match> </device> </deviceinfo> # This scipt mount all devices in file /tmp/system-mountsd and # remove this file afterwards. # This is a work-around for suse 10.1 # # 28.6.2006 # # ### BEGIN INIT INFO # Provides: mountPostKdmStart # Required-Start: haldaemon $ALL # Should-Start: # Required-Stop: # Should-Stop: $time # Default-Start: 3 5 # Default-Stop: # Short-Description: mountPostKdmStart starts not hal-mounted disks. # Description: mountPostKdmStart starts not hal-mounted disks. # The system udev writes the devices in question to # /tmp/system-mountsd. # Because is not enouch to wait for haldaemon I define to start as the # latest service in this runlevel. # At stop of this service the file /tmp/system-mountsd is moved to # /tmp/system-mountsd-stop. This takes care that another disk is mounted # and written to the file /tmp/system-mountsd before the stop of this service. # ### END INIT INFO # # Check for missing binaries (stale symlinks should not happen) # Note: Special treatment of stop for LSB conformance MYMOUNT=/usr/local/bin/mountsd-from-file test -x $MYMOUNT || { echo "$MYMOUNT not installed"; if [ "$1" = "stop" ]; then exit 0; else exit 5; fi; } . /etc/rc.status # Reset status of this service rc_reset case "$1" in start) dfile=/tmp/system-mountsd if [ -e $dfile ] then #loop over all devices in file, avoid double items for device in `sort $dfile | uniq ` do echo "$device mounted" /usr/local/bin/mountsd-from-file $device done mv $dfile ${dfile}.old fi # Remember status and be verbose rc_status -v ;; stop) echo ' stop ---------------------------------' dfile=/tmp/system-mountsd if [ -e $dfile ] then mv $dfile ${dfile}-stop fi rc_status -v ;; *) echo "Usage: $0 {start}" exit 1 ;; esac rc_exit ---new file -------------------------------------------------- ./usr/lib64/hal/scripts/hal-system-storage-mount-diff-treestructure 7a8,9
# # allow / to build a tree structure, 20060628 73a76 # I want / !!!!!!!!!!!!!!!! 92c95,98 < GIVEN_MOUNTPOINT=${GIVEN_MOUNTPOINT//[^a-zA-Z0-9_+-]/_}
# original #GIVEN_MOUNTPOINT=${GIVEN_MOUNTPOINT//[^a-zA-Z0-9_+-]/_} GIVEN_MOUNTPOINT=${GIVEN_MOUNTPOINT//[^a-zA-Z0-9_+-/]_}
---new file -------------------------------------------------- ./usr/local/bin/mountsd-from-file #!/bin/sh #i mount all devices in temporary file /tmp/system-mountsd # with hal to get the mount-point defined by hal # consider key volume.policy.should_mount # # Problem is hal daemon is not active. Then the rest of the script will fail. # therefore all devices are written to /tmp/system-mountsd so that they # can be mounted later in run-level-5. # # # 20060627 a=`hal-find-by-property --key "block.device" --string /dev/$1` m=`hal-get-property --key volume.policy.desired_mount_point --udi $a` doMount=`hal-get-property --key volume.policy.should_mount --udi $a` if [ "${doMount}xx" = "truexx" ] then halmount "/dev/$1" "$m" fi ---new file -------------------------------------------------- ./usr/local/bin/mountsd #!/bin/sh #i mount a device with hal to get the mount-point defined by hal # consider key volume.policy.should_mount # # Problem is hal daemon is not active. Then the rest of the script will fail. # therefore all devices are written to /tmp/system-mountsd so that they # can be mounted later in run-level-5. # # # 20060627 touch /tmp/system-mountsd echo $1 >> /tmp/system-mountsd a=`hal-find-by-property --key "block.device" --string /dev/$1` m=`hal-get-property --key volume.policy.desired_mount_point --udi $a` doMount=`hal-get-property --key volume.policy.should_mount --udi $a` #here hal is working, remove the temporary file ##if [ -e /var/run/hal/haldaemon.pid ]; then rm /tmp/system-mountsd; fi if [ "${doMount}xx" = "truexx" ] then halmount "/dev/$1" "$m" fi ---new file -------------------------------------------------- ./usr/share/hal/fdi/policy/95pmahr-policy/05-wda-western-digital-1200-mountpoints.fdi <?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- --> <!-- -*- mount points wd1200, fixed device /dev/sdm, 20060328 -*- --> <deviceinfo version="0.2"> <!-- -*- sdm1 -*- --> <device> <match key="block.device" string="/dev/sdm1"> <merge key="volume.policy.should_mount" type="bool">true</merge> <merge key="volume.policy.desired_mount_point" type="string">wd1200/wd1200-p1</merge> <merge key="volume.policy.mount_option.sync" type="bool">false</merge> </match> </device> <!-- -*- sdm2 -*- --> <device> <match key="block.device" string="/dev/sdm2"> <merge key="volume.policy.should_mount" type="bool">true</merge> <merge key="volume.policy.desired_mount_point" type="string">wd1200/wd1200-p2</merge> <merge key="volume.policy.mount_option.sync" type="bool">false</merge> </match> </device> </deviceinfo>