:: Re: [DNG] /etc/boot.d and boot star…
Top Pagina
Delete this message
Reply to this message
Auteur: wirelessduck
Datum:  
Aan: Dng
Onderwerp: Re: [DNG] /etc/boot.d and boot startup scripts


> On 19 Apr 2023, at 04:20, Jim Jackson <jj@???> wrote:
>
> 
>
>
>> On Tue, 18 Apr 2023, onefang wrote:
>>
>>> On 2023-04-18 13:12:29, wirelessduck--- via Dng wrote:
>>> Hi,
>>>
>>> I'm trying to get a `docker compose` to run on system startup so I
>>> thought I could add the shell script that runs `docker compose up -d`
>>> into /etc/rc.local. Is that the recommended place to put this sort of
>>> thing? My system is running sysvinit on Devuan chimaera.
>>>
>>> I also saw in /etc/rc.local that it contains a reference to
>>> /etc/boot.d which I can't find anywhere on my system. Is /etc/boot.d
>>> a better option for this? I can see that it's using a tool called
>>> run-parts that I have no experience with.
>>>
>>> Is there any documentation anywhere on using /etc/boot.d? I couldn't
>>> find any references on internet searches.
>>
>> /etc/boot.d is a directory you can create and fill with shell scripts.
>> If it doesn't exist, /etc/rc.local ignores it. So it's a good place to
>> put your extra stuff you want to run at that time during boot.
>>
>> Mine has numbered scripts, so it runs them in that order I think. I
>> can't recall where the docs for it are.
>
> The scripts in the xxxx.d directory are usually run by run-parts
> thetre is a man page for run-parts
>
> By default the scripts in the directory have names entirely of ASCII upper-
> and lower-case letters, ASCII digits, ASCII underscores, and ASCII
> minus-hyphens and be executable. That means e.g. one can disable a "script"
> by renaming "script".off or by simple removing the executable bits in the
> permissions.
>
> run-parts is used extensively by debian and all its derivatives.


Thanks. I’ve never heard of those extra features like disabling scripts, so that is good to know.