[artix-general] [dinit] About the latest changes on dinit rc.*

Javier je-vv at e.email
Tue Jun 11 01:19:18 CEST 2024


BTW, yes, there's a dependency on those scripts being there, they are the ones called, see:

> % cat /usr/lib/dinit/rclocal
> #!/bin/sh
> 
> [ ! -f /etc/rc.local ] && {
> cat <<EOF > /etc/rc.local
> #!/bin/sh
> # rc.local for Artix -- enter your commands here
> # it should be run when starting local.target service
> EOF
> chmod 755 /etc/rc.local
> }
> 
> [ ! -f /etc/rc.shutdown ] && {
> cat <<EOF > /etc/rc.shutdown
> #!/bin/sh
> # rc.shutdown for Artix -- enter your commands here
> # it should be run when stopping local.target service
> EOF
> chmod 755 /etc/rc.shutdown
> }
> 
> case "$1" in
>     startup)  [ -x /etc/rc.local ]    && /etc/rc.local ;;
>     shutdown) [ -x /etc/rc.shutdown ] && /etc/rc.shutdown ;;
> esac
> 
> exit 0

Therefore I'll have to write them by hand, if I want to keep using /etc/local.d/*.start and /etc/local.d/*.stop scripts, or if there were more than one (that's not my case) copy them over in order inside respective:

> /etc/rc.local
> /etc/rc.shutdown

It's weird those were not copied over, even if they were not modified, because they used to refer to other scripts, which now, without modifications, are no longer used, :(  I think I misinterpreted the message, I should have read it, if I have something called by rc.local and rc.shutdown, even if they were not modified, I should copy them over...  But, how would I know if they weren't kept as *.pacsave files, hahaha?

Ok, mistery solved, I guess this would have required an announcement prior to the deploytment, so one could copy over the files before the upgrade, and that would be it, :)

Thanks !

--
Javier


On 2024-06-10 04:47 PM, Javier wrote:
> Ups, I meant I didn't find:
> 
>> /etc/rc.local
>> /etc/rc.shutdown
> 
> After the upgrade...  And I'm not sure if I should write them myself...
> 
> Greetings !
> 
> -- 
> Javier
> 
> 
> On 2024-06-10 02:38 PM, Javier wrote:
>> Hello !
>>
>> After Today's upgrade I noticed:
>>
>>> (1/3) upgrading dinit-rc                                                                                           [####################################################################] 100%
>>> == ATTENTION! ==
>>> We made some important changes so you might need to move some of your files if
>>> you modified it previously.
>>>
>>> - /etc/dinit.d/config/hwclock.conf has been moved to /etc/hwclock.conf
>>> - /etc/dinit.d/config/rc.local has been moved to /etc/rc.local
>>> - /etc/dinit.d/config/rc.shutdown has been moved to /etc/rc.shutdown
>>>
>>> If you didn't modify any of these files, there shouldn't be any problem.
>>> Otherwise, you may want to move your configurations to reflect the new
>>> structure, particularly /etc/rc.local and /etc/rc.shutdown.
>>>
>>> For more information, see forum post:
>>>
>>> https://forum.artixlinux.org/index.php/topic,6972.html
>>
>> I also checked on the the forum topi referenced in the message...
>>
>> I didn't have custom settings on any of those, but I do have:
>>
>>> % ls /etc/local.d/
>>> rc.start  rc.stop
>>
>> scripts.  So I would expect other scripts to call for those, but after the upgrade, I don't find:
>>
>>> /etc/dinit.d/config/rc.local
>>> /etc/dinit.d/config/rc.shutdown
>>
>> although both the upgrade message and the referenced forum URL indicate they should be there.  The past config files had:
>>
>>> % cat /etc/dinit.d/config/rc.local
>>> #!/bin/sh
>>>
>>> # /etc/dinit.d/config/rc.local -- rc.local for Artix Linux
>>> #
>>>
>>> if [ -d /etc/local.d ]; then
>>>     for file in /etc/local.d/*.start; do
>>>         sh "$file"
>>>     done
>>> fi
>>>
>>> # Enter your custom commands here.
>>
>> and:
>>
>>> % cat /etc/dinit.d/config/rc.shutdown
>>> #!/bin/sh
>>>
>>> # /etc/dinit.d/config/rc.shutdown -- rc.shutdown for Artix Linux
>>> #
>>>
>>> if [ -d /etc/local.d ]; then
>>>     for file in /etc/local.d/*.stop; do
>>>         sh "$file"
>>>     done
>>> fi
>>>
>>> # Enter your custom commands here.
>>
>> Should I manually write them down?  Did they move some other place rather than the one mentioned in both the upgrade message and the referenced forum?
>>
>> I do expect my "rc.start" and "rc.stop" scripts on "/etc/local.d/" to still be automatically called, but I'm not sure if they are, since the scripts calling them went away...
>>
>> Thanks !
>>
> 

-- 
Javier

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: OpenPGP digital signature
URL: <https://lists.artixlinux.org/archives/artix-general/attachments/20240610/2304ee89/attachment.sig>


More information about the artix-general mailing list