Jump to content
Read the Funtoo Newsletter: Summer 2023 ×

Preventing unwanted runlevel and config file modifications.


voidzero

Recommended Posts

As a user who uses Funtoo almost ubiquitously on servers and workstations, and loves it dearly, I just can't get used to a couple of things. Hope we can talk these over.

 

First point that's been bugging me for a long time is when an installation or update modifies my runlevels. It's pretty annoying and on my systems, the only person who alters a runlevel should be me.

 

All I'm asking is for is a way to be able to prevent runlevel modification. I'm cool when the default stays like how it is now. But I need to divert from the default. Maybe a setting in rc.conf or make.conf? Maybe some confirmation step like we have dispatch-conf for config file alteration?

 

For example, I just installed a postfix update on a server and it added postfix to the default runlevel. But what if I don't want that? Maybe I'm using stacked runlevels. Or maybe I have an 'online' runlevel and an 'offline' runlevel. Right now I don't have a choice in the matter.

 

Same with /etc/init.d/hostname. If there's one init script I abhor... :ph34r:  This one even alters /etc/hosts. The audacity!

 

Alright, that's a strong word. But still. I just need a way more simple hostname script that just sets the hostname via /bin/hostname and leave it at that. I tried to create my own replacement init script for that, for example /etc/init.d/myhostname, but when I update openrc... BAM the default script is added right back to the default runlevel.

 

Guys, this should not happen. There are other examples. Lvm for instance. What if I don't use lvm? "Then there shouldn't be a problem." No, there is a problem because I don't have a choice and need to pay extra attention.

 

The current way I'm working around runlevel modification is by creating a copy of /etc/runlevels, and after updating or whatever, setting that copy back. And for good measure I make a copy of /etc/hosts. Or I lock it by using chattr +i. Yeah that last option sucks. But it's what users do when a file keep sbeing changed. So the extra steps I need to take to make sure that my own post-installation modifications stay in place, are growing. Hope this is something we can discuss, because all I'm really asking for is more versatility.  :)  

Link to comment
Share on other sites

get to the choppah!  yeah i kinda don't like the idea of postfix shipping with the stage3, i also kinda dont like the idea of the kernels shipping with stage3....  hostname needs to be fixed also yeah, for adding arbitrary hosts.  i think the 2 ebuilds could have a use flag inserted to disable the touching of the services, though i haven't looked at the ebuilds.  so ill +1 this....

Link to comment
Share on other sites

Well, postfix into stage3, we could have a separate thread for this. I can understand why people don't like this, although in Linux land it is required to have some mail daemon. Or is this an outdated convention and am I starting to show my grey hairs?  :blink:

 

Regarding the runlevel modifications - I was thinking of a switch in make.conf because this is the config file that is read by emerge.

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...