[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

debconf and daemons



Hello all,

I'm trying my hand at a somewhat more challenging package this time, which 
uses debconf to extract a username and password from the user whichi is 
stored in a config file in /etc and used to start a daemon (specifically a 
login client). I've got a couple of problems though:

 - debconf doesn't append '|| true' to the init.d stop in prerm. this 
means that when start-stop-daemon returns 1 the removal/upgrade fails 
miserably if the daemon isn't running or can't be stopped. imho this is 
broken (although it may be better than removing a package under a daemon 
that refuses to stop?). how do i get around this? ignore it?

 - install -m 600 myfile /etc/myfile doesn't set the permissions 
appropriately (?)

 - debconf was surprisingly easy... however creating the config files once 
the information has been obtained wasn't. i would have liked to have 
filled in a template but ended up doing 'echo "key value" >> /etc/myfile'. 
is there a 'standard' way of doing this? perhaps i should be using perl 
and text::template?

Any assistance would be most appreciated,

 - samj


Attachment: ""
Description: Binary data


Reply to: