[Lunar-commits] <moonbase> cdrtools: use /etc/modprobe.d/
Paul Bredbury
brebs at lunar-linux.org
Tue Sep 1 21:52:02 CEST 2009
commit 1cef818d5a857630f42ec2f70040936bb30b9972
Author: Paul Bredbury <brebs at lunar-linux.org>
Date: Wed Sep 2 02:52:02 2009 +0700
cdrtools: use /etc/modprobe.d/
Use /etc/modprobe.d/ide-scsi.conf, instead of /etc/modules.d/ide-scsi and the old "include" line in /etc/modules.conf
Don't install /etc/default/rscsi.dfl - that's just confusing. It's not obvious or commonly-used that "dfl" means "default". Plus, /etc/default/cdrecord doesn't get a .dfl file.
---
cd/cdrtools/BUILD | 10 ++++------
cd/cdrtools/DETAILS | 2 +-
cd/cdrtools/POST_INSTALL | 27 +++++++++++++++++----------
cd/cdrtools/POST_REMOVE | 2 +-
cd/cdrtools/ide-scsi | 2 --
cd/cdrtools/ide-scsi.conf | 2 ++
6 files changed, 25 insertions(+), 20 deletions(-)
diff --git a/cd/cdrtools/BUILD b/cd/cdrtools/BUILD
index 1932ae4..5d50458 100644
--- a/cd/cdrtools/BUILD
+++ b/cd/cdrtools/BUILD
@@ -4,9 +4,9 @@
# this will make it use its own headers
# not the last linned kernel headers
- sedit "s?/usr/src/linux/include?/usr/include?g" DEFAULTS/Defaults.linux
+ sedit "s?/usr/src/linux/include?/usr/include?g" DEFAULTS/Defaults.linux &&
- if `module_installed smake` ; then
+ if module_installed smake ; then
THISMAKE=smake
else
THISMAKE=./Gmake.linux
@@ -15,8 +15,6 @@
DEFINSGRP=root &&
prepare_install &&
$THISMAKE INS_BASE=/usr DEFINSUSR=root \
- DEFINSGRP=root MANDIR=share/man install &&
- mkdir -p /etc/default &&
- install -m644 rscsi/rscsi.dfl /etc/default
-
+ DEFINSGRP=root MANDIR=share/man install
+
) > $C_FIFO 2>&1
diff --git a/cd/cdrtools/DETAILS b/cd/cdrtools/DETAILS
index 0d44a50..02164d3 100644
--- a/cd/cdrtools/DETAILS
+++ b/cd/cdrtools/DETAILS
@@ -8,7 +8,7 @@
SOURCE2_VFY=sha1:a8794b14306b291f1451f53eda4c00d86b5a4408
WEB_SITE=http://cdrecord.berlios.de/old/private/cdrecord.html
ENTERED=20010922
- UPDATED=20090813
+ UPDATED=20090901
SHORT="cdrtools creates home-burned CDs with a CD-R/CD-RW recorder"
cat << EOF
diff --git a/cd/cdrtools/POST_INSTALL b/cd/cdrtools/POST_INSTALL
index cffa2c3..1a1cf19 100644
--- a/cd/cdrtools/POST_INSTALL
+++ b/cd/cdrtools/POST_INSTALL
@@ -1,17 +1,24 @@
mod_ide_scsi() {
- if [ ! -f /etc/modules.d/ide-scsi ]; then
- mkdir -p /etc/modules.d
- cp $SCRIPT_DIRECTORY/ide-scsi /etc/modules.d
- fi
-
- MOD="/etc/modules.conf"
- INC="include /etc/modules.d/ide-scsi"
+ if [ ! -e /etc/modprobe.d/ide-scsi.conf ] ; then
+ if [ -e /etc/modules.d/ide-scsi ] ; then
+ message "Moving /etc/modules.d/ide-scsi to /etc/modprobe.d/ide-scsi.conf"
+ mv /etc/modules.d/ide-scsi /etc/modprobe.d/ide-scsi.conf
+ else
+ message "Installing /etc/modprobe.d/ide-scsi.conf"
+ install -D -m644 $SCRIPT_DIRECTORY/ide-scsi.conf /etc/modprobe.d/ide-scsi.conf
- grep -q "$INC" $MOD ||
- echo "$INC" >> $MOD
- depmod -a
+ MOD="/etc/modules.conf"
+ TMP="/tmp/modules.conf"
+ INC="include /etc/modules.d/ide-scsi"
+ # Remove old cruft
+ cp $MOD $TMP &&
+ grep -v "$INC" $TMP > $MOD
+ rm $TMP
+ fi
+ depmod -a
+ fi
}
case $IDE_SCSI in
diff --git a/cd/cdrtools/POST_REMOVE b/cd/cdrtools/POST_REMOVE
index 9dc2130..fb7ae28 100644
--- a/cd/cdrtools/POST_REMOVE
+++ b/cd/cdrtools/POST_REMOVE
@@ -2,7 +2,7 @@ MOD="/etc/modules.conf"
TMP="/tmp/modules.conf"
INC="include /etc/modules.d/ide-scsi"
-cp $MOD $TMP
+cp $MOD $TMP &&
grep -v "$INC" $TMP > $MOD
rm $TMP
depmod -a
diff --git a/cd/cdrtools/ide-scsi b/cd/cdrtools/ide-scsi
deleted file mode 100644
index 9a7a6a0..0000000
--- a/cd/cdrtools/ide-scsi
+++ /dev/null
@@ -1,2 +0,0 @@
-alias char-major-11 sr_mod
-above sr_mod scsi_mod ide-scsi sg
diff --git a/cd/cdrtools/ide-scsi.conf b/cd/cdrtools/ide-scsi.conf
new file mode 100644
index 0000000..c085bb4
--- /dev/null
+++ b/cd/cdrtools/ide-scsi.conf
@@ -0,0 +1,2 @@
+alias char-major-11 sr_mod
+above sr_mod scsi_mod ide-scsi sg
More information about the Lunar-commits
mailing list