salut,
je suis sous debian sarge kernel 2.6, kde, je souhaite que ma clef usb soit montée avec un raccourcie sur le bureau comme sous ubuntu.
J'ai pour cela suivi ce tuto : [
sarcelle.net]
je problème c'est que j'ai jamais écris de script (il faut bien commencer).
et je doit merder quelque part puisque je n'ai pas le résultat escompté, voici donc le script qui doit etre incorrect en ésperant que quelqun puisse éclairer ma lanterne, peut ëtre y a il une page web que j'aurait du lire?! :
/etc/usbmount/mount.d/00_remove_model_symlink/
#!/bin/sh
# This script creates the model name symlink in /var/run/usbmount.
# Copyright (C) 2005 Martin Dickopp
#
# This file is free software; the copyright holder gives unlimited
# permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
#
set -e
FICHIER=`echo "$UM_MOUNTPOINT" | sed 's|/media/||'`
for i in `ls /home/`;
do
echo "[Desktop Entry]
Dev=$UM_DEVICE
Encoding=UTF-8
Icon=memory_stick_mount
MountPoint=$UM_MOUNTPOINT
ReadOnly=false
Type=FSDevice
UnmountIcon=memory_stick_unmount" > /home/$i/Desktop/$FICHIER ;
done
exit 0
# Replace spaces with underscores, remove special characters in vendor
# and model name.
UM_VENDOR=`echo "$UM_VENDOR" | sed 's/ /_/g; s/[^0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._-]//g'`
UM_MODEL=`echo "$UM_MODEL" | sed 's/ /_/g; s/[^0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._-]//g'`
# Exit if both vendor and model name are empty.
test -n "$UM_VENDOR" || test -n "$UM_MODEL" || exit 0
# Build symlink name.
if test -n "$UM_VENDOR" && test -n "$UM_MODEL"; then
name="${UM_VENDOR}_$UM_MODEL"
else
name="$UM_VENDOR$UM_MODEL"
fi
# Append partition number, if any, to the symlink name.
partition=`echo "$UM_DEVICE" | sed 's/^.*[^0123456789]\([0123456789]*\)/\1/'`
if test -n "$partition"; then
name="${name}_$partition"
fi
# If the symlink does not yet exist, create it.
test -e "/var/run/usbmount/$name" || ln -sf "$UM_MOUNTPOINT" "/var/run/usbmount/$name"
exit 0