Package: switchconf
Version: 0.0.4-1
Severity: important
Tags: patch
The scripts present in /etc/switchconf/before.d/ and
/etc/switchconf/after.d/ are executed in the order they are present in
the directory structure (more or less random in fact). This is very
annoying since you can't tell that you want to execure foo before bar.
I propose to sort the files so you can have:
$ ls -1 /etc/switchconf/before.d/
10ifdown.sh
20pcmcia.sh
and 10ifdown.sh will always be executed before 20pcmcia.sh
I propose the patch (just add "| sort"):
# executing each scripts before
-for r in `find ${conf_top_dirs}/${exec_dir_before} -type f -perm +1`; do
+for r in `find ${conf_top_dirs}/${exec_dir_before} -type f -perm +1 | sort`; do
echo -n "Executing $r .. ";
echo "------------- Executing $r -----------------" >> ${logfile}
${r} 2>&1 >> ${logfile}
@@ -65,7 +66,7 @@
done
# executing each scripts after
-for r in `find ${conf_top_dirs}/${exec_dir_after} -type f -perm +1`; do
+for r in `find ${conf_top_dirs}/${exec_dir_after} -type f -perm +1 | sort`; do
echo -n "Executing $r .. "
echo "------------- Executing $r -----------------" >> ${logfile}
${r} 2>&1 >> ${logfile}
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (500, 'testing'), (500, 'stable'), (90, 'unstable'), (1,
'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-1-686
Locale: LANG=fr_FR, LC_CTYPE=fr_FR (charmap=ISO-8859-1)
-- no debconf information
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]