Andrew Lester <martinblan...@gmail.com> writes:

> Hi all,

Hi,

> This is probably a very simple question, but for the life of me I have not 
> been able to
> locate a solution. I am running a RADIUS server on OpenBSD 5.5 stable (+ 
> openssl patches) 
> using FreeRADIUS 2.2.0p2 from the ports tree. When I first installed 
> FreeRADIUS, it worked
> great. However, when I rebooted the system, radiusd would no longer start. I 
> discovered
> the run_dir of /var/lrun/radiusd, which houses the PID file and socket, was 
> missing. I
> re-created the directory and changed its ownership to _freeradius. After 
> that, it
> started working again. But whenever the system reboots, the entire 
> /var/run/radiusd
> directory gets deleted somehow.

That's a fact, /var/run is cleaned up at boot time.

> The only references I could find regarding this happening with OpenBSD was on 
> a blog,
> where the recommendation was simply to manually re-create the directory. 
> There must be
> something I am missing here, and I feel like it’s probably quite simple. Does 
> anybody know
> what I need to do in order to prevent the run dir from being deleted, or know 
> if there is
> a better location for it where it won’t be automatically deleted when the 
> system reboots?

The fr package comes with an rc script that takes care of this for you:

  rc_pre() {
        /usr/bin/install -d -o _freeradius /var/run/radiusd
  }

If you don't use it (eg. because you run radiusd -X in tmux), just add
that line to /etc/rc.local.

> Thanks in advance for any help, it is much appreciated and OpenBSD rocks!

:)

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to