Inetd services: Difference between revisions
From Lolly's Wiki
Jump to navigationJump to search
m (Text replacement - "<source " to "<syntaxhighlight ") |
m (Text replacement - "[[Kategorie:" to "[[Category:") |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
[[ | [[Category:Solaris]] | ||
==Setting up rsyncd as inetd service== | ==Setting up rsyncd as inetd service== | ||
Line 5: | Line 5: | ||
<syntaxhighlight lang=bash> | <syntaxhighlight lang=bash> | ||
# printf "rsync\tstream\ttcp\tnowait\troot\t/usr/bin/rsync\t/usr/bin/rsync --config=/etc/rsyncd.conf --daemon\n" >> /etc/inetd.conf | # printf "rsync\tstream\ttcp\tnowait\troot\t/usr/bin/rsync\t/usr/bin/rsync --config=/etc/rsyncd.conf --daemon\n" >> /etc/inetd.conf | ||
</ | </syntaxhighlight> | ||
2. Use inetconv to generate your XML file | 2. Use inetconv to generate your XML file | ||
Line 14: | Line 14: | ||
rsync -> /tmp/rsync-tcp.xml | rsync -> /tmp/rsync-tcp.xml | ||
Importing rsync-tcp.xml ...Done | Importing rsync-tcp.xml ...Done | ||
</ | </syntaxhighlight> | ||
3. Optionally modify the generated XML file /tmp/rsync-tcp.xml | 3. Optionally modify the generated XML file /tmp/rsync-tcp.xml | ||
Line 21: | Line 21: | ||
<syntaxhighlight lang=bash> | <syntaxhighlight lang=bash> | ||
# svccfg import /tmp/rsync-tcp.xml | # svccfg import /tmp/rsync-tcp.xml | ||
</ | </syntaxhighlight> | ||
5. Enable it: | 5. Enable it: | ||
<syntaxhighlight lang=bash> | <syntaxhighlight lang=bash> | ||
# inetadm -e svc:/network/rsync/tcp:default | # inetadm -e svc:/network/rsync/tcp:default | ||
</ | </syntaxhighlight> | ||
6. Check it: | 6. Check it: | ||
Line 32: | Line 32: | ||
# netstat -anf inet | nawk -v port="$(nawk '$1=="rsync"{gsub(/\/.*$/,"",$2);print $2;}' /etc/services)" '$1 ~ port"$" && $NF=="LISTEN"' | # netstat -anf inet | nawk -v port="$(nawk '$1=="rsync"{gsub(/\/.*$/,"",$2);print $2;}' /etc/services)" '$1 ~ port"$" && $NF=="LISTEN"' | ||
*.873 *.* 0 0 49152 0 LISTEN | *.873 *.* 0 0 49152 0 LISTEN | ||
</ | </syntaxhighlight> |
Latest revision as of 04:50, 26 November 2021
Setting up rsyncd as inetd service
1. Put it into the legacy file /etc/inetd.conf
# printf "rsync\tstream\ttcp\tnowait\troot\t/usr/bin/rsync\t/usr/bin/rsync --config=/etc/rsyncd.conf --daemon\n" >> /etc/inetd.conf
2. Use inetconv to generate your XML file
# inetconv -o /tmp
100235/1 -> /tmp/100235_1-rpc_ticotsord.xml
Importing 100235_1-rpc_ticotsord.xml ...Done
rsync -> /tmp/rsync-tcp.xml
Importing rsync-tcp.xml ...Done
3. Optionally modify the generated XML file /tmp/rsync-tcp.xml
4. Import the XML file
# svccfg import /tmp/rsync-tcp.xml
5. Enable it:
# inetadm -e svc:/network/rsync/tcp:default
6. Check it:
# netstat -anf inet | nawk -v port="$(nawk '$1=="rsync"{gsub(/\/.*$/,"",$2);print $2;}' /etc/services)" '$1 ~ port"$" && $NF=="LISTEN"'
*.873 *.* 0 0 49152 0 LISTEN