42 lines
983 B
Bash
Executable File
42 lines
983 B
Bash
Executable File
#!/bin/sh
|
|
|
|
for i in /dev/cdrom-*
|
|
do
|
|
if [ -L $i ]
|
|
then
|
|
[ "$CD_NUMBER" = "" ] && ln -s $i /dev/cdrom
|
|
[ "$CD_NUMBER" = "" ] && CD_NUMBER="-1"
|
|
[ ! "$CD_NUMBER" = "" ] && CD_NUMBER="$((CD_NUMBER+1))" && ln -s $i /dev/cdrom$CD_NUMBER
|
|
fi
|
|
done
|
|
|
|
for i in /dev/cdrw-*
|
|
do
|
|
if [ -L $i ]
|
|
then
|
|
[ "$CDRW_NUMBER" = "" ] && ln -s $i /dev/cdrw
|
|
[ "$CDRW_NUMBER" = "" ] && CDRW_NUMBER="-1"
|
|
[ ! "$CDRW_NUMBER" = "" ] && CDRW_NUMBER="$((CDRW_NUMBER+1))" && ln -s $i /dev/cdrw$CDRW_NUMBER
|
|
fi
|
|
done
|
|
|
|
for i in /dev/dvd-*
|
|
do
|
|
if [ -L $i ]
|
|
then
|
|
[ "$DVD_NUMBER" = "" ] && ln -s $i /dev/dvd
|
|
[ "$DVD_NUMBER" = "" ] && DVD_NUMBER="-1"
|
|
[ ! "$DVD_NUMBER" = "" ] && DVD_NUMBER="$((DVD_NUMBER+1))" && ln -s $i /dev/dvd$DVD_NUMBER
|
|
fi
|
|
done
|
|
|
|
for i in /dev/dvdrw-*
|
|
do
|
|
if [ -L $i ]
|
|
then
|
|
[ "$DVDRW_NUMBER" = "" ] && ln -s $i /dev/dvdrw
|
|
[ "$DVDRW_NUMBER" = "" ] && DVDRW_NUMBER="-1"
|
|
[ ! "$DVDRW_NUMBER" = "" ] && DVDRW_NUMBER="$((DVDRW_NUMBER+1))" && ln -s $i /dev/dvdrw$DVDRW_NUMBER
|
|
fi
|
|
done
|