Skip to content

Commit

Permalink
Ensure lockdir and rundir exist with correct permissions on startup
Browse files Browse the repository at this point in the history
If /var/run or /var/lock happen to be on tmpfs filesystems, then the subdirectories
needed at runtime for condor-cron do not exist.  This commit adds code to the start()
function in /etc/rc.d/init.d/condor-cron to ensure the RUN and LOCK directories
are created and assigned the correct ownership.

Bug: https://ticket.grid.iu.edu/30906
  • Loading branch information
axs-gentoo committed Aug 15, 2016
1 parent db9090c commit 3a5905d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions etc/condor.init
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ pidfile=/var/run/condor-cron/$prog.pid

start() {
echo -n $"Starting Condor-cron daemons: "

# Ensure the condor-cron rundir and lockdir exist
local rundir=$(condor_cron_config_val RUN)
local lockdir=$(condor_cron_config_val LOCK)
mkdir -p ${rundir} ${lockdir}
chown cndrcron:cndrcron ${rundir} ${lockdir}

daemon --pidfile $pidfile --check $prog $prog -pidfile $pidfile
RETVAL=$?
echo
Expand Down

0 comments on commit 3a5905d

Please sign in to comment.