Commit ff3eb58e by Oliver Pinter

workaround FreeBSD default rc.conf.d sourcing, this fixes DHCP issue

parent e82187a9
......@@ -21,8 +21,20 @@ fi
if [ ! -d /root/agent ]
then
cd /root
git clone https://git.ik.bme.hu/circle/agent.git
git clone https://github.com/opntr/bme-circle-cloud-agent.git agent
fi
cd /root/agent
grep "If a service" /etc/rc.subr
ret=$?
if [ $ret -eq 0 ]
then
echo "patching /etc/rc.subr ..."
(
cd /etc
patch -p1 < /root/agent/bootstrap/freebsd/fix-rc.subr.diff
)
fi
python agent.py
--- /etc/rc.subr.orig 2014-12-18 21:07:36.000000000 +0100
+++ /etc/rc.subr 2014-12-18 21:09:44.000000000 +0100
@@ -1330,24 +1330,17 @@
_rc_conf_loaded=true
fi
- # If a service name was specified, attempt to load
- # service-specific configuration
- if [ -n "$_name" ] ; then
- for _d in /etc ${local_startup%*/rc.d}; do
- if [ -f ${_d}/rc.conf.d/"$_name" ]; then
- debug "Sourcing ${_d}/rc.conf.d/$_name"
- . ${_d}/rc.conf.d/"$_name"
- elif [ -d ${_d}/rc.conf.d/"$_name" ] ; then
- local _rc
- for _rc in ${_d}/rc.conf.d/"$_name"/* ; do
- if [ -f "$_rc" ] ; then
- debug "Sourcing $_rc"
- . "$_rc"
- fi
- done
- fi
- done
- fi
+ for _d in /etc ${local_startup%*/rc.d}; do
+ if [ -d ${_d}/rc.conf.d ] ; then
+ local _rc
+ for _rc in ${_d}/rc.conf.d/* ; do
+ if [ -f "$_rc" ] ; then
+ debug "Sourcing $_rc"
+ . "$_rc"
+ fi
+ done
+ fi
+ done
# Set defaults if defined.
for _var in $rcvar $rcvars; do
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment