![]() |
|
|||||||
| Guides All Guides and HOWTO's. |
|
|
Thread Tools | Display Modes |
|
|||
|
Comment out /etc/inetd.conf and prevent inetd from starting:
Code:
# ---------------------------------------------------------
echo Comment out all lines of inetd,conf
# -- real
FILE=/etc/inetd.conf
BACKUP=/etc/${FILE}.orig
# -- testing
#FILE=$(basename ${FILE})
#BACKUP=$(basename ${BACKUP})
cp -p $FILE $BACKUP
sed -e '/^[^#]/s/^/#/' $BACKUP > $FILE
The regular expression: Code:
/ : start search ^ : at begin of line [^#] : followed by not a comment '#' sign / : end of search at the begin of line. Within a character class '[ ]' it negates the characters from the character class. So '[#]' will match a '#', and '[^#]' matches any character as long it is not a '#" So on all lines which do not start with a '#' do the following "search and replace" : Code:
s : 'search and replace' or substitute / : delimiter or indicator for start of search pattern ^ : null string at begin of line / : end of search pattern, start of replacement pattern # : a literal '#' character / : end of replacement Code:
# ----------------------------------------------------------
echo Disable inetd
FILE=/etc/rc.conf.local
cat <<END >>${FILE}
inetd=NO
END
You will have to check "/etc/defaults/rc.conf" for the correct setting. Modify the FILE variable to point at /etc/rc.conf
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| OpenBSD nsd (name server daemon) imported in CVS | J65nko | News | 2 | 17th January 2010 05:05 PM |
| dbus-daemon | lumiwa | FreeBSD General | 2 | 2nd October 2008 12:05 AM |
| difference between rc.conf and loader.conf | disappearedng | FreeBSD General | 5 | 3rd September 2008 05:54 AM |
| inetd, ftpd problems | jsadm | FreeBSD General | 7 | 24th August 2008 08:33 PM |
| Runing vsftpd in standalone mode or with inetd? | bigb89 | FreeBSD Security | 2 | 8th May 2008 11:38 PM |