You can also add dependencies on packages you know you want in your custom config. You can find which packages own each file with dpkg -S /path/to/file. If you've made a change to /etc/ssh/sshd_config, then you probably want to depend on openssh-server which ensures that file is installed before your script works on it. You can also add dependencies to this package. If you need to run any commands (such as useradd or realm) then you should also do that in postinst. Sed 's/PasswordAuthentication yes/PasswordAuthentication no/' -i /etc/ssh/sshd_config Here are some examples: echo "192.168.1.1 router" > /etc/hosts Make an attempt to undo the change in the prerm script. If you really need to make changes to an existing configuration file, add it to your postinst script. Your package will be in conflict and fail to install. Don't deploy your own version of /etc/sudoers expecting it to override the version deployed by sudo. If you've changed a file such as /etc/sudoers or /etc/apt/sources.list, try to put your changes in /etc/sudoers.d/ or /etc/apt//. #Linux os iso file install#New configuration files are easy to install as part of a package.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |