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

Re: init script, installed but not activated



Hleb Valoshka:
> On 10/6/15, Antonio Terceiro <terceiro@debian.org> wrote:
> 
>> for sysvinit you need to code that manually in the initscript. several
>> packages have their initscripts source /etc/default/$package, and check
>> for some variable that says whether the service should start on boot or
>> not.
> 
> And that's exactly how it's done currently. But systemd fanboys want
> to remove any control variables from defaults and leave there only
> environment variables.

My understanding is there's no clean way to not run a systemd service file
based on the contents of a shell variable, and therefore the contents of an
/etc/default file.  See:


https://wiki.ubuntu.com/SystemdForUpstartUsers#A.2BAC8-etc.2BAC8-default_files_which_enable.2BAC8-disable_jobs

You can do ugly things like having the systemd service file shell out to do
the real start, thereby being able to evaluate what code to run in the shell
script, but nobody likes doing that.

   -- Chris

-- 
Chris Knadle
Chris.Knadle@coredump.us


Reply to: