It isn't just Ubuntu that suffers from this problem;
Debian itself doesn't guarantee that /var/run survives
a reboot either.
The interesting part about this is that one cannot change the work
directory in the rc file either, because the temporary file for sourcing
the configuration is stored in ... surprise ... the work directory.
. $WORKDIR/rcfile.$$
So there's no way to change the work directory without modifying the
package (or one of its read-only files). I'd consider that to be a bug.
Fix: use $(tempfile) for the above file name.
NB: Using "/tmp/tiger.$$" as a temporary working directory is a security
problem.
diff -ub tiger-3.2.1-31.new/config.in tiger-3.2.1-31/config.in
--- tiger-3.2.1-31.new/config.in 2006-08-30 09:28:33.000000000 +0200
+++ tiger-3.2.1-31/config.in 2006-08-30 10:06:32.000000000 +0200
@@ -133,8 +133,14 @@
# TODO: WORKDIR should be removed on exit if it is located in a temporary
# directory
if [ ! -d "$WORKDIR" ] ; then
+ case "$WORKDIR" in
+ /var/run/* )
+ mkdir -p "$WORKDIR"
+ ;;
+ *)
echo "Configured working directory $WORKDIR does not exist" >&2
exit 1
+ esac
fi
@@ -228,10 +222,11 @@
#
[ -n "$RCFILE" -a -f $RCFILE ] && {
+ tmpf=$(tempfile)
$GREP -v '^#' $RCFILE |
- $SED -e 's/^\(.*\)=/export \1; \1=/' > $WORKDIR/rcfile.$$
- . $WORKDIR/rcfile.$$
- $RM -f $WORKDIR/rcfile.$$
+ $SED -e 's/^\(.*\)=/export \1; \1=/' > $tmpf
+ . $tmpf
+ $RM -f $tmpf
}
HOSTNAME=`$GETHOSTNAME`
--
Matthias Urlichs | {M:U} IT Design @ m-u-it.de | [EMAIL PROTECTED]
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]