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

Re: Back to systemd [was: Re: New list for Raspbian? (was: Re: systemdq)]




> On Dec 30, 2019, at 05:47 PM, Sven Hartge <sven@svenhartge.de> wrote:
> 
> Please show the output of
> 
>    systemctl cat YOUR_SERVICE_UNIT
> 
> This will show all additions and overrides to the unit.

root@test:~# systemctl cat ipfilter
# /usr/lib/systemd/system/ipfilter.service
[Unit]
Description=packetFilter

[Service]
ExecStart=/etc/ipfilterfiles/ipfilter.sh on
ExecStop=/etc/ipfilterfiles/ipfilter.sh off

[Install]
WantedBy=multi-user.target

> Your shell script isn't really daemon, so it is normal to not stay
> running after it setup the iptables rules.

I guess I misunderstood the term 'daemon.' I thought it was just a piece of software that, when run, stays run until it's through -- when it's started at boot and has no exit, hangs around in the background doing stuff. Unless somebody tells it to stop.

This code has, under the old init system, been thinking it's a daemon for a couple decades now. But you're right. On other systemd computers, I have to start my local firewall by hand, like I have to with BIND on the DNS server. 

> I think your unit is missing the following:
> 
> ,----
> | [Service]
> | Type=oneshot
> | RemainAfterExit=yes
> `----

That makes sense. I'll insert those lines and see what happens. 

I knew it'd be trivial when it came to light what I was missing. Thanks a lot.

(grumble, grumble, systemd, grumble, grumble)

>> And how did that file get in /usr? When I wrote it, it was in
>> /lib/systemd/system.
> 
> usr-merge is the keyword here.

What's that? I never heard of that before, and I certainly didn't ask for it. One of the reasons I run Debian was that the config stuff is all in /etc. And, it goes without saying, stays there.

As I said before, (grumble, grumble, systemd, grumble, grumble). It seems to be pretty nicely done system code, but with an absolutely abominable user interface. So far, I know of systemd dirs in /lib, /etc, and /usr. That's no way to run a *nix railroad.

While I have you on the hook, Sven, how/where did you get your systemd knowledge? I've looked around, and I haven't seen any mention of what you just told me. 

-- 
Glenn English




Reply to: