[Raphael Geissert]
> As mentioned on IRC, when a virtual facility depends on itself
> insserv enters an infinite loop and starts leaking memory.

Thank you.  I've written this test case to reproduce the problem.  CC
to upstream to let him know about the problem.


test_insserv_virt_loop() {
echo
echo "info: test insserv handle virtual facilities depending on itself."
echo

initdir_purge

list_rclinks

# If $local_fs depend on itself, the error is triggered.
set +C
cat <<'EOF' > $insconf
$local_fs       +mountall $local_fs
EOF
set -C

# This will hang and use unlimited amount of memory
insertscript testscript <<'EOF'
### BEGIN INIT INFO
# Provides:          testscript
# Required-Start:    $local_fs
# Required-Stop:
# Default-Start:     1
# Default-Stop:
### END INIT INFO
EOF

list_rclinks

update_conf
}


We will be careful to not introduce such loops in the
/etc/insserv.conf file included in the insserv package. :)

Of course individual packages can provide extra config in
/etc/insserv.conf.d/, and thus trigger this bug on their own.

Happy hacking,
-- 
Petter Reinholdtsen



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to