Re: Probleme mit (SATA-)DVD-LW unter RHEL4 auf FSC Esprimo P5915



On Fri, 20 Apr 2007 22:13:53 +0100, Joern Abatz wrote:

Sobald es halbwegs läuft, setze ich es auf die Homepage und melde mich
nochmal.

Ich bin nicht dazu gekommen, es zu verbessern. Es funktioniert manchmal
nicht gleich beim ersten Versuch. Besser geht es nicht im Augenblick. Ich
habe auch keine Zeit zum Hochladen. Deshalb einfach hier:

Kommandozeile im Startbutton:
----------
xterm -e 'premount /dev/sdd1 /media/sdd1 Thunar'
----------
(Thunar ist hier der Filemanager)


/etc/fstab:
----------
/dev/sdc1 /media/sdc1 auto defaults,user,noauto,sync 0 0
/dev/sdd1 /media/sdd1 auto defaults,user,noauto,sync 0 0
----------
(wenn man welche mit vfat hat, muß man noch sowas wie z.B.
',dmask=7,fmask=117,gid=1002' hinzufügen, sonst meckert mc)


/usr/local/bin/premount (755 root.root):
----------
#!/bin/sh

test -z "$3" && echo "Usage: $0 <device> <mountpoint> <browser>" && exit 1

DEV=$1
DIR=$2
PRG=$3
D2=$DEV

FILE1=~/${0##*/}1
FILE2=~/${0##*/}2

# if $DEV does not exist, cut off partition number to get whole disk-device:
while [ ! -e "$DEV" -a -n "$D2" ]
do
# cut off last character:
D2=${D2%?}

# access disk-device to wake up udevd, should create $DEV:
/bin/dd if=$D2 of=/dev/null bs=1 count=1
done
test ! -e "$DEV" && echo "$0: no such file: $DEV" && exit 2

# mount partition $DEV according to fstab:
/bin/mount $DEV

# collect all windows' id w h x y:
/usr/bin/xwininfo -root -tree -int \
| /bin/grep '^ [0-9]' \
| /bin/sed -e '1d' -e 's/(.*)//' -e 's/".*"//' -e 's/://' \
| /usr/bin/awk '{print $1" "$2}' \
| /usr/bin/tr 'x+' ' ' \
> $FILE1

# start file-browser:
$PRG $DIR

# collect windows again:
/usr/bin/xwininfo -root -tree -int \
| /bin/grep '^ [0-9]' \
| /bin/sed -e '1d' -e 's/(.*)//' -e 's/".*"//' -e 's/://' \
| /usr/bin/awk '{print $1" "$2}' \
| /usr/bin/tr 'x+' ' ' \
> $FILE2

NEWWIN="`/usr/bin/diff $FILE1 $FILE2 | /bin/grep '>' | /usr/bin/awk '{print $2}'
/bin/rm $FILE1 $FILE2
echo "$0: new window: $NEWWIN"

# wait for browser to be closed again:
while /usr/bin/xwininfo -id $NEWWIN >/dev/null 2>&1
do /bin/sleep 1
done
echo "$0: $PRG ended - unmounting $DEV"

# unmount $DEV:
/bin/umount $DEV
----------

.


Loading