42 lines
899 B
Plaintext
42 lines
899 B
Plaintext
![]() |
#!/bin/sh
|
||
|
|
||
|
for i in /dev/cdrom-*
|
||
|
do
|
||
|
if [ -L $i ]
|
||
|
then
|
||
|
[ "$CD_NUM" = "" ] && ln -s $i /dev/cdrom
|
||
|
[ "$CD_NUM" = "" ] && CD_NUM="-1"
|
||
|
[ ! "$CD_NUM" = "" ] && CD_NUM="$((CD_NUM+1))" && ln -s $i /dev/cdrom$CD_NUM
|
||
|
fi
|
||
|
done
|
||
|
|
||
|
for i in /dev/cdrw-*
|
||
|
do
|
||
|
if [ -L $i ]
|
||
|
then
|
||
|
[ "$CDRW_NUM" = "" ] && ln -s $i /dev/cdrw
|
||
|
[ "$CDRW_NUM" = "" ] && CDRW_NUM="-1"
|
||
|
[ ! "$CDRW_NUM" = "" ] && CDRW_NUM="$((CDRW_NUM+1))" && ln -s $i /dev/cdrw$CDRW_NUM
|
||
|
fi
|
||
|
done
|
||
|
|
||
|
for i in /dev/dvd-*
|
||
|
do
|
||
|
if [ -L $i ]
|
||
|
then
|
||
|
[ "$DVD_NUM" = "" ] && ln -s $i /dev/dvd
|
||
|
[ "$DVD_NUM" = "" ] && DVD_NUM="-1"
|
||
|
[ ! "$DVD_NUM" = "" ] && DVD_NUM="$((DVD_NUM+1))" && ln -s $i /dev/dvd$DVD_NUM
|
||
|
fi
|
||
|
done
|
||
|
|
||
|
for i in /dev/dvdrw-*
|
||
|
do
|
||
|
if [ -L $i ]
|
||
|
then
|
||
|
[ "$DVDRW_NUM" = "" ] && ln -s $i /dev/dvdrw
|
||
|
[ "$DVDRW_NUM" = "" ] && DVDRW_NUM="-1"
|
||
|
[ ! "$DVDRW_NUM" = "" ] && DVDRW_NUM="$((DVDRW_NUM+1))" && ln -s $i /dev/dvdrw$DVDRW_NUM
|
||
|
fi
|
||
|
done
|