X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/projects.git/blobdiff_plain/6f9143b4dc635b60ed8040828bfa96edf31bd288..9b2f0a49f8779366665b0fbfdf531e48786a1f86:/debian/sysd2sysv.postinst diff --git a/debian/sysd2sysv.postinst b/debian/sysd2sysv.postinst index 442c70f..e47abd8 100755 --- a/debian/sysd2sysv.postinst +++ b/debian/sysd2sysv.postinst @@ -5,14 +5,16 @@ set -e pushd /etc/init.d >/dev/null for file in $(ls) do - if grep "# sysd2sysv-template #" $file + if grep "# sysd2sysv-template #" $file >/dev/null then - rm $file - fi - # for downward compatibility - if [ -f mlistd ] - then - rm mlistd + echo "renew $file from template" + sed "s/%PROG%/$file/" /var/sysd2sysv/sysd2sysv.tpl > $file fi done +# for downward compatibility +if [ -f mlistd ] +then + sed "s/%PROG%/mlistd/" /var/sysd2sysv/sysd2sysv.tpl > mlistd +fi +