Re: init script
>> "MM" == Mauro Mazzieri <mazzieri@iol.it> writes:
MM> 1) The program must be started as:
MM> # udplog <level>
MM> where level is a number. No default is read from is config file. Is
MM> 2) Non all the user would like to start the command from init. So
MM> there must a postinst script that ask the user if he wants to use
MM> or not init. How can I put the right code, together with the code
MM> generated by dh_installinit?
Interactivity should be avoided.
Better make it like the xdm setup.
Provide a /etc/udplog.conf
# Start the udplog from init on system startup ?
# Possible values are
# yes
# no
start_from_init = yes
# Level of operation.
# Possible values are:
# 1 : foo
# 2 : bar
# Warning: This setting is only used when starting udplog from init.d
level = 1
Then you write a small perl/awk/sed whatever script (check xdm's init
script) to parse this file.
You can make a small note during postinst, that one has to edit the
conffile to disable automatic startup.
Ciao,
Martin
Reply to: