Re: priority on /dev/sda4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Luciano, 

i got your comments.
i will try your script.

thanks for all

Marc

>
> Try this: (there's probably a better way, but as long as it works...)
>
> 1. Add to the end of /etc/hotplug/scsi.agent the following two lines:
> /sbin/findziphdd &
> exit 0
>
> 2. create the file /sbin/findziphdd by c&p the following lines in a
> console, as root:
> cat <<"EOF" > /sbin/findziphdd
> #! /bin/sh
> exec 2> /dev/null
>
> function readable {
>
>         : < /dev/$1
>
> }
>
> PEN=
> ZIP=
> HDD=
> for dev in sda sdb sdc sdd sde sdf
> do
>         readable ${dev} || break
>         if readable ${dev}1 && readable ${dev}2
>         then
>                 HDD=${dev}
>         elif readable ${dev}1
>         then
>                 PEN=${dev}1
>         elif readable ${dev}4
>         then
>                 ZIP=${dev}4
>         fi
> done
>
> [ "$ZIP" ] && ln -fs $ZIP /dev/zip || rm -f /dev/zip
> [ "$PEN" ] && ln -fs $PEN /dev/pen || rm -f /dev/pen
> rm -f /dev/usbdisc*
> if [ "$HDD" ]
> then
>         readable ${HDD}1 && ln -fs ${HDD}1 /dev/usbdisc1
>         readable ${HDD}2 && ln -fs ${HDD}2 /dev/usbdisc2
>         readable ${HDD}3 && ln -fs ${HDD}3 /dev/usbdisc3
>         readable ${HDD}4 && ln -fs ${HDD}4 /dev/usbdisc4
>         for ((i=5; ; i++))
>         do
>                 readable ${HDD}${i} || break
>                 ln -fs ${HDD}${i} /dev/usbdisc$i
>         done
> fi
> exit 0
> EOF
>
> 3. turn it executable
> chmod +x /sbin/findziphdd
>
> 4. change fstab entry for the usb disc, zip (and optionally a pen) to use
> the following paths as device:
>    - usb disc: /dev/usbdisc1 .. /dev/usbdisc10 (the last partition on disc)
>    - zip: /dev/zip
>    - pen: /dev/pen
>
> 5. Try it out :)
>
> Regards,
> Luciano Rocha



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux