Archiv > Development
Testbericht Mld 3.0.2 Mit Tt-s2-6400
wino:
--- Quote ---USB funktionieren nicht.
--- End quote ---
Wenn du möchtest, kannst du die beiden Regeln nach /etc/udev/rules.d legen. Wenn der USB-Stick ein Label hat, erscheint dieser mit dem Namen unter /media.
'11-media-by-label-auto-mount.rules' Da auch die eingebauten Platten unter /media erscheinen und dies eventuell nicht erwünscht ist, kann KERNEL!="sd[b-z] angepasst werden. Bei diesem Beispiel wird die erste Platte /dev/sda ausgelassen.
--- Code: ---KERNEL!="sd[b-z][0-9]", GOTO="media_by_label_auto_mount_end"
PROGRAM="/usr/bin/grep -q ' %M:%m /[^ ]* /' /proc/self/mountinfo", PROGRAM!="/usr/bin/grep -q ' %M:%m / /media/' /proc/self/mountinfo", GOTO="media_by_label_auto_mount_end"
# Import FS infos
IMPORT{program}="/sbin/blkid -o udev -p %N"
# Get a label if present, otherwise specify one
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
ENV{ID_FS_LABEL}=="", ENV{dir_name}="hd-%k"
# Global mount options
ACTION=="add", ENV{mount_options}="noatime"
# Filesystem-specific mount options
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,umask=002"
# Mount the device
ACTION=="add", RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount -o $env{mount_options} /dev/%k /media/%E{dir_name}"
# Clean up after removal
ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l /media/%E{dir_name}", RUN+="/bin/rmdir /media/%E{dir_name}"
# Exit
LABEL="media_by_label_auto_mount_end"
--- End code ---
Die zweite Regel ist für SD-Karten gedacht.
11-sd-cards-auto-mount.rules
--- Code: ---KERNEL!="mmcblk[0-9]p[0-9]", GOTO="sd_cards_auto_mount_end"
PROGRAM="/usr/bin/grep -q ' %M:%m /[^ ]* /' /proc/self/mountinfo", PROGRAM!="/usr/bin/grep -q ' %M:%m / /media/' /proc/self/mountinfo", GOTO="sd_cards_auto_mount_end"
# Global mount options
ACTION=="add", ENV{mount_options}="relatime"
# Filesystem specific options
ACTION=="add", IMPORT{program}="/sbin/blkid -o udev -p %N"
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,umask=002"
ACTION=="add", RUN+="/bin/mkdir -p /media/sd-%k", RUN+="/bin/ln -s /media/sd-%k /mnt/sd-%k", RUN+="/bin/mount -o $env{mount_options} /dev/%k /media/sd-%k"
ACTION=="remove", RUN+="/bin/umount -l /media/sd-%k", RUN+="/bin/rmdir /media/sd-%k"
LABEL="sd_cards_auto_mount_end"
--- End code ---
Gruß
wino
gkd-berlin:
Hallo wino,
ist ja stark. Hat geklappt. Die Sticks werden ohne mount und umount als hd-sdb1 angezeigt und sind benutzbar.
Die Sticklabel erscheinen nicht. Aber so ist es auch schon sehr schön.
Vielen Dank
Gruß Gerhard
MegaX:
--- Quote ---Hallo MegaX,
die
--- End quote ---
gkd-berlin:
Hallo MegaX,
auch diesmal kein Erfolg.
Gruß Gerhard
gkd-berlin:
Hallo MegaX,
ich hab was gefunden.
In der Zeile: CPU=$(sensors | grep -i 'Core 0' | tr -s ' ' | cut -d' ' -f 3) fehlt ein /usr/bin/.
Es muß so geschrieben werden: CPU=$(sensors | grep -i 'Core 0' | /usr/bin/tr -s ' ' | cut -d' ' -f 3)
Jetzt wird die CPU-Temperatur richtig angezeigt.
Gruß Gerhard
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version