summaryrefslogtreecommitdiffstats
path: root/abs/core/udev/cdsymlinks.sh
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2010-10-23 18:17:40 (GMT)
committerJames Meyer <james.meyer@operamail.com>2010-10-23 18:19:39 (GMT)
commitadbcf19958300e9b6598990184c8815b945ba0ee (patch)
treef4283c850ac0ac202c17e78a637ee7ca8147621b /abs/core/udev/cdsymlinks.sh
parent61a68250df10d29b624650948484898334ff22d0 (diff)
downloadlinhes_pkgbuild-adbcf19958300e9b6598990184c8815b945ba0ee.zip
linhes_pkgbuild-adbcf19958300e9b6598990184c8815b945ba0ee.tar.gz
linhes_pkgbuild-adbcf19958300e9b6598990184c8815b945ba0ee.tar.bz2
Removed old core and extra from repo. Renamed -testing to core/extra. This will setup the base for the testing branch.
Diffstat (limited to 'abs/core/udev/cdsymlinks.sh')
-rwxr-xr-xabs/core/udev/cdsymlinks.sh11
1 files changed, 5 insertions, 6 deletions
diff --git a/abs/core/udev/cdsymlinks.sh b/abs/core/udev/cdsymlinks.sh
index c4185ac..498abda 100755
--- a/abs/core/udev/cdsymlinks.sh
+++ b/abs/core/udev/cdsymlinks.sh
@@ -1,11 +1,15 @@
#! /bin/sh
# Creates cdsymlinks in /dev
# for Archlinux by Tobias Powalowski <tpowa@archlinux.org>
-if [ -d /dev/cd ]; then
+
+# check on cd/dvd drives and if persistant rules file is used
+if [ -d /dev/cd -a ! -e /etc/udev/rules.d/75-persistent-cd.rules ]; then
+ # remove existing device files
rm /dev/cdrom*
rm /dev/cdrw*
rm /dev/dvd*
rm /dev/dvdrw*
+ # start creating symlinks
for i in /dev/cd/cdrom-*; do
if [ -h $i ]; then
[ "$CD_NUMBER" = "" ] && ln -s $i /dev/cdrom
@@ -37,9 +41,4 @@ if [ -d /dev/cd ]; then
! [ "$DVDRW_NUMBER" = "" ] && DVDRW_NUMBER="$((DVDRW_NUMBER+1))" && ln -s $i /dev/dvdrw$DVDRW_NUMBER
fi
done
-else
- rm /dev/cdrom*
- rm /dev/cdrw*
- rm /dev/dvd*
- rm /dev/dvdrw*
fi