Cours:FixLegoLinux
Révision datée du 27 août 2019 à 08:32 par Bjacquot (discussion | contributions) (Page créée avec « <source lang=bash> #!/bin/bash if [ "$ACTION" = "add" ] then echo "+">>/tmp/testrules printenv >> /tmp/testrules fsck.vfat -aw $DEVNAME >> /tmp/te... »)
#!/bin/bash
if [ "$ACTION" = "add" ]
then
echo "+">>/tmp/testrules
printenv >> /tmp/testrules
fsck.vfat -aw $DEVNAME >> /tmp/testrules
sleep 0.1
sync
fsck.vfat -aw $DEVNAME >> /tmp/testrules
sleep 0.1
sync
fsck.vfat -aw $DEVNAME >> /tmp/testrules
sleep 0.1
sync
fsck.vfat -aw $DEVNAME >> /tmp/testrules
sleep 0.1
sync
mount $DEVNAME /mnt/mountLego >> /tmp/testrules
rm -R /mnt/mountLego/*
fsck.vfat -aw $DEVNAME >> /tmp/testrules
sleep 0.1
sync
fsck.vfat -aw $DEVNAME >> /tmp/testrules
sleep 0.1
sync
fsck.vfat -aw $DEVNAME >> /tmp/testrules
sleep 0.1
sync
fsck.vfat -aw $DEVNAME >> /tmp/testrules
sleep 0.1
sync
umount $DEVNAME >> /tmp/testrules
fsck.vfat -aw $DEVNAME >> /tmp/testrules
sleep 0.1
sync
fsck.vfat -aw $DEVNAME >> /tmp/testrules
sleep 0.1
sync
fsck.vfat -aw $DEVNAME >> /tmp/testrules
sleep 0.1
sync
fsck.vfat -aw $DEVNAME >> /tmp/testrules
sleep 0.1
sync
mount $DEVNAME /mnt/mountLego >> /tmp/testrules
rm -R /mnt/mountLego/*
umount $DEVNAME >> /tmp/testrules
elif [ "$ACTION" = "remove" ]
then
echo "-">>/tmp/testrules
fi