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 28th May 2008
mathias mathias is offline
New User
 
Join Date: May 2008
Posts: 3
Default /etc/rc.* files isn't read properly?

Hi all.

I am new to OpenBSD, and I seem to have some start up problems.

I am running 4.1 (yes i know).

Ive just installed OpenVPN and configured it.

I works fine and I can connect to it.

I start it in this way:
cd /etc/openvpn/

openvpn server.conf

Surely I want it to start at boot time so I added:

if [ -x /usr/local/sbin/openvpn ]; then
/usr/local/sbin/openvpn --config /etc/openvpn/server.conf
fi

(This works fine if I type it in a shell (OpenVPN starts)).

to /etc/rc.local and to be sure also to /etc/rc.conf.local

But when I reboots the system, OpenVPN doesn't start.

Pf is activated so the rc scripts is being read by the system, but not my part.

dmesg doesn't tell me anything that can lead me towards any solution, please tell me if you want to see it.

ps aux isn't showing me anything about OpenVPN either.

Can anyone might tell me what I am doing wrong?

Thanks!
Reply With Quote
  #2   (View Single Post)  
Old 28th May 2008
mfaridi's Avatar
mfaridi mfaridi is offline
Spam Deminer
 
Join Date: May 2008
Location: Afghanistan
Posts: 320
Default

put your /etc/rc.conf.local in here
Reply With Quote
  #3   (View Single Post)  
Old 28th May 2008
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 8,032
Default

/etc/rc.conf and /etc/rc.conf.local are for environment variables only. Not for shell scripting.

If you want a shell script run at boot, put the sequence in /etc/rc.local.

See the man page for rc(8)
Reply With Quote
  #4   (View Single Post)  
Old 1st June 2008
mathias mathias is offline
New User
 
Join Date: May 2008
Posts: 3
Default

Quote:
Originally Posted by jggimi View Post
/etc/rc.conf and /etc/rc.conf.local are for environment variables only. Not for shell scripting.

If you want a shell script run at boot, put the sequence in /etc/rc.local.

See the man page for rc(8)
I know the fact that /etc/rc.conf.local is for enviroment variables only, I just did it as an experiment.
Reply With Quote
  #5   (View Single Post)  
Old 1st June 2008
mathias mathias is offline
New User
 
Join Date: May 2008
Posts: 3
Default

Quote:
Originally Posted by mfaridi View Post
put your /etc/rc.conf.local in here
Here it is:

# cat /etc/rc.local
# $OpenBSD: rc.local,v 1.39 2006/07/28 20:19:46 sturm Exp $

# Site-specific startup actions, daemons, and other things which
# can be done AFTER your system goes into securemode. For actions
# which should be done BEFORE your system has gone into securemode
# please see /etc/rc.securelevel.

echo -n 'starting local daemons:'

# Add your local startup actions here.


if [ -x /usr/local/sbin/openvpn ]; then
/usr/local/sbin/openvpn --config /etc/openvpn/server.conf
fi




#
Reply With Quote
Reply


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
Cleaning Portsnap files in /var/db/portsnap/files bram85 FreeBSD Ports and Packages 2 5th October 2009 09:54 AM
xterm color does not behave properly. pieterverberne OpenBSD General 2 19th August 2009 05:17 PM
read & modify files out side chroot jail Dr_Death_UAE FreeBSD Security 5 6th November 2008 09:20 PM
File system not properly dismounted rex FreeBSD General 6 12th September 2008 02:45 PM
Can't get mail system to work properly! Sunsawe FreeBSD Ports and Packages 2 30th June 2008 07:32 PM


All times are GMT. The time now is 11:27 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