OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 29-Jul-2003 11:10:47
Branch: HEAD Handle: 2003072910104700
Modified files:
openpkg-src/openpkg HISTORY rc
Log:
fixed processing of $openpkg_rc_def (requires pre-inclusion of
rc.conf)
Summary:
Revision Changes Path
1.24 +1 -0 openpkg-src/openpkg/HISTORY
1.45 +19 -7 openpkg-src/openpkg/rc
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/openpkg/HISTORY
============================================================================
$ cvs diff -u -r1.23 -r1.24 HISTORY
--- openpkg-src/openpkg/HISTORY 29 Jul 2003 08:44:05 -0000 1.23
+++ openpkg-src/openpkg/HISTORY 29 Jul 2003 09:10:47 -0000 1.24
@@ -2,6 +2,7 @@
2003
====
+20030729 rc: fixed processing of $openpkg_rc_def (requires pre-inclusion of rc.conf)
20030729 fixed nasty filedescriptor leakage in RPM on script execution
20030728 upgraded to cURL 7.10.6
20030728 rc: stop processing 'start' and 'restart' scripts if .rpmsave files exists
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/openpkg/rc
============================================================================
$ cvs diff -u -r1.44 -r1.45 rc
--- openpkg-src/openpkg/rc 28 Jul 2003 15:06:16 -0000 1.44
+++ openpkg-src/openpkg/rc 29 Jul 2003 09:10:47 -0000 1.45
@@ -149,15 +149,18 @@
# handle --query option
if [ ".$query" = .1 ]; then
- # suck in %config sections of all scripts for default values
- scripts=`/bin/ls $rcdir/rc.* | sed -e "s;^$rcdir/rc\.;;"`
+ # suck in all %config sections of all scripts
+ # (rc.openpkg is special: has to be first and requires pre-inclusion of
rc.conf)
touch $tmpfile
+ sed <$rcdir/rc.openpkg >>$tmpfile -e "1,/^%config/d" -e '/^%.*/,$d'
+ echo ". $rcconf" >>$tmpfile
+ scripts=`/bin/ls $rcdir/rc.* | sed -e "s;^$rcdir/rc\.;;" | egrep -v '^openpkg$'`
for s_name in $scripts; do
sed <$rcdir/rc.$s_name >>$tmpfile -e "1,/^%config/d" -e '/^%.*/,$d'
done
. $tmpfile
- # apply override values
+ # apply override values to get effective values
. $rcconf
# display variable value
@@ -171,9 +174,12 @@
# handle --config option
if [ ".$config" = .1 ]; then
- # suck in %config sections of all scripts for default values
- scripts=`/bin/ls $rcdir/rc.* | sed -e "s;^$rcdir/rc\.;;"`
+ # suck in all %config sections of all scripts
+ # (rc.openpkg is special: has to be first and requires pre-inclusion of
rc.conf)
touch $tmpfile
+ sed <$rcdir/rc.openpkg >>$tmpfile -e "1,/^%config/d" -e '/^%.*/,$d'
+ echo ". $rcconf" >>$tmpfile
+ scripts=`/bin/ls $rcdir/rc.* | sed -e "s;^$rcdir/rc\.;;" | egrep -v '^openpkg$'`
for s_name in $scripts; do
sed <$rcdir/rc.$s_name >>$tmpfile -e "1,/^%config/d" -e '/^%.*/,$d'
done
@@ -418,8 +424,11 @@
# because by design all command scripts see the %config
# section of all(!) scripts. Because of $openpkg_rc_def the
# variable, we place the %config section of "openpkg" to the front.
+ # And we have to extra pre-include the rc.conf to allow
+ # rc.conf to override the default of $openpkg_rc_def, too.
+ sed <$rcdir/rc.openpkg >>$tmpfile -e "1,/^%config/d" -e '/^%.*/,$d'
+ echo ". $rcconf" >>$tmpfile
l_scripts=`/bin/ls $rcdir/rc.* | sed -e "s;^$rcdir/rc\.;;" | egrep -v
'^openpkg$'`
- l_scripts="openpkg $l_scripts"
for l_name in $l_scripts; do
sed <$rcdir/rc.$l_name >>$tmpfile -e "1,/^%config/d" -e '/^%.*/,$d'
done
@@ -505,8 +514,11 @@
# because by design all command scripts see the %config
# section of all(!) scripts. Because of $openpkg_rc_def the
# variable, we place the %config section of "openpkg" to the front.
+ # And we have to extra pre-include the rc.conf to allow
+ # rc.conf to override the default of $openpkg_rc_def, too.
+ sed <$rcdir/rc.openpkg >>$tmpfile -e "1,/^%config/d" -e '/^%.*/,$d'
+ echo ". $rcconf" >>$tmpfile
l_scripts=`/bin/ls $rcdir/rc.* | sed -e "s;^$rcdir/rc\.;;" | egrep -v
'^openpkg$'`
- l_scripts="openpkg $l_scripts"
for l_name in $l_scripts; do
sed <$rcdir/rc.$l_name >>$tmpfile -e "1,/^%config/d" -e '/^%.*/,$d'
done
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]