Bootstrap: docker-daemon
From: slurm:slurmd

%files
	31-slurmd-configless /etc/docker-init.d/31-slurm-configless
	/container/volumes/munge/munge.key /etc/munge/munge.key
	cgroup.conf.noautomount /etc/slurm/cgroup.conf

%post
	rm /etc/docker-init.d/30-slurmd
	chmod 755 /etc/docker-init.d/31-slurm-configless

%startscript
	if [ -z "${1}" -o -z "${2}" ] ; then
		echo "undefined variables slurmctld or nodename"
		exit 1
	fi
	export slurmctld="${1}"
	export nodename="${2}"
	echo ${slurmctld} ${nodename} ${SLURMD_LOG_PATH} ${SLURM_SCHED_LOG_PATH}
	exec /usr/local/sbin/entrypoint.sh /usr/local/sbin/docker-init

%runscript
	if [ -z "${1}" -o -z "${2}" ] ; then
		echo "undefined variables slurmctld or nodename"
		exit 1
	fi
	export slurmctld="${1}"
	export nodename="${2}"
	echo ${slurmctld} ${nodename} ${SLURMD_LOG_PATH} ${SLURM_SCHED_LOG_PATH}
	exec /usr/local/sbin/entrypoint.sh /usr/local/sbin/docker-init
