I need some assistance with some sed replaces:
sed -ri 's#logging {
/* If you want to enable debugging, eg. using the 'rndc trace' command,
* named will try to write the 'named.run' file in the $directory (/var/named").
* By default, SELinux policy does not allow named to modify the /var/named" directory,
* so put the default debug log file in data/ :
*/
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
#logging {
/* If you want to enable debugging, eg. using the 'rndc trace' command,
* named will try to write the 'named.run' file in the $directory (/var/named").
* By default, SELinux policy does not allow named to modify the /var/named" directory,
* so put the default debug log file in data/ :
*/
channel default_debug {
file "data/named.run";
severity dynamic;
};
category security { null; };
};
#g' /etc/named.conf
Basically I'm trying to add "category security { null; };" to /etc/named.conf (different line numbers on different servers) on quite a few systems, and sed is failing out on me.
Any tips and suggestions would be greatly appreciated.
Create a file and enter this
then save and run it like this