Bypassing and Overriding Configuration Files

Sometimes you may want to bypass or override a startup script or configuration file. In some cases, the easiest way to do this is to delete, rename, or move the file. For instance, removing a SysV startup script or its link in a relevant runlevel prevents that script from running. In this way, you can disable a server when the system starts. One potential risk to such actions is that automatic configuration tools may add the file back, particularly if you merely modified a link.

Sometimes you can edit a startup script to have it use a different configuration file than is the default. For instance, the -s option to smbd and nmbd (two programs that together compose Samba) specifies the configuration file. It's not used in most SysV startup scripts for Samba, but you could add it if you wanted to move the Samba configuration files to some location other than the default for your distribution.

Sometimes it's possible to use a local startup script to modify the actions of earlier startup scripts. For instance, if your system is obtaining a bizarre hostname from a Dynamic Host Configuration Protocol (DHCP) server at boot time, you can override that setting by using the hostname command in a local configuration fileā€”if the local configuration file runs after the startup script that calls your DHCP client. If not, you may need to locate that startup script and modify it so that it doesn't accept the DHCP server's hostname or so that the script includes a call to hostname itself.

0 0

Post a comment