DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 6th May 2015
ffonz ffonz is offline
New User
 
Join Date: Apr 2015
Posts: 6
Unhappy How do I run inetd at startup?

I am trying to backup my Synology NAS to my old NAS. The old NAS has to be an rsync compatible server (according to Synology), and the original OS didn't support it. Fortunately OpenBSD supports my NAS (landisk, well done!), and I managed to get rsync running in daemon mode manually.

I read the option to launch rsync via inetd. I thought this would be the best option. I followed the instructions in the man pages. Everything is done under the root account. The line
Code:
rsync           873/tcp
was already in my /etc/services.

I created /etc/inetd.conf and added the line
Code:
rsync   stream  tcp     nowait  root   /usr/local/bin/rsync rsyncd --daemon
Then I had to send a HUP signal to inetd. But with "ps -A" I didn't see inetd running.

So I added the line
Code:
inetd=YES
to rc.conf.local, which looks now like this:
Code:
ntpd_flags=
inetd=YES
When I enter inetd at the CLI everything works fine. But when I reboot the NAS, I still don't see inetd running with ps -A. What am I missing?
Reply With Quote
  #2   (View Single Post)  
Old 6th May 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Hello, and welcome!

You can start inetd(8) at boot with defaults flags by having this line in /etc/rc.conf.local:
Code:
inetd_flags=
You can edit the file, or use the new rcctl(8) command.

Last edited by jggimi; 6th May 2015 at 06:48 PM. Reason: corrected link, removed typo.
Reply With Quote
  #3   (View Single Post)  
Old 6th May 2015
Oko's Avatar
Oko Oko is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 1,102
Default

You don't need inet to run rsync in deamon mode. You can create a daemon control script in /etc/rc.d/rsyncd and start it

Code:
echo 'pkg_scripts="rsyncd"' >> /etc/rc.conf.local
Please read man pages of rc.d for the correct syntax. I found it useful to read scripts of other daemons. I would swear that OpenBSD ships an example of such a script but I am too tired after the work to look for it.
Reply With Quote
  #4   (View Single Post)  
Old 6th May 2015
ffonz ffonz is offline
New User
 
Join Date: Apr 2015
Posts: 6
Default

Thanks jggimi, your suggestion works!

This is what my /etc/rc.conf.local now looks like:
Code:
ntpd_flags=
inetd_flags=
inetd=YES
Oko also thanks for your contribution. The rc.d directory was also an option, but I already came so far with inetd, that jggimi's solution was the easiest one.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
startup (rc) problems kopcicle OpenBSD General 9 15th May 2010 08:35 PM
Comment out '/etc/inetd.conf' and disable 'inetd' daemon J65nko Guides 0 24th January 2010 10:53 PM
inetd, ftpd problems jsadm FreeBSD General 7 24th August 2008 08:33 PM
Beep on startup? matt Programming 1 16th July 2008 08:33 AM
Runing vsftpd in standalone mode or with inetd? bigb89 FreeBSD Security 2 8th May 2008 11:38 PM


All times are GMT. The time now is 06:13 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick