Hi there,
we decided to change the default runlevel to 4, in runlevel 4 starts an additional software
since some scripts in /etc/init.d do stop software in Runlevel 4 I need to change the configuration in the files using the chkconfig entry from
# chkconfig: 235 77 99
to
# chkconfig: 2345 77 99
and re-register the scripts with chkconfig --del and chkconfig --add.
Therefore I intend to write a script, which checks the field 2, if it contains a 3 it would substitue it by 34.
Well I could write a very dowdy script, which heads and tails the file and cut the chkconfig into pieces to substitute the entry, BUT, is there an awk/perl/sed wizzard, which may write this in a single line?
Best Regards, Franz
--
System Manager (Solaris, HP-UX, Linux, some networking, some SAN)
we decided to change the default runlevel to 4, in runlevel 4 starts an additional software
since some scripts in /etc/init.d do stop software in Runlevel 4 I need to change the configuration in the files using the chkconfig entry from
# chkconfig: 235 77 99
to
# chkconfig: 2345 77 99
and re-register the scripts with chkconfig --del and chkconfig --add.
Therefore I intend to write a script, which checks the field 2, if it contains a 3 it would substitue it by 34.
Well I could write a very dowdy script, which heads and tails the file and cut the chkconfig into pieces to substitute the entry, BUT, is there an awk/perl/sed wizzard, which may write this in a single line?
Best Regards, Franz
--
System Manager (Solaris, HP-UX, Linux, some networking, some SAN)