mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-22 20:54:49 +09:00
net.ipv4.ip_forward is always set to 1 in every recontextualization if cron_start_script used as start script. Signed-off-by: Ricardo Diaz <rdiaz@opennebula.systems>
23 lines
461 B
Bash
23 lines
461 B
Bash
#!/bin/sh
|
|
|
|
sysctl -w net.ipv4.ip_forward=1
|
|
|
|
script_name="$(echo $FILES_DS | sed -n 's/.*:\x27\(.*\)\x27/\1/p')"
|
|
|
|
map_vnets_script_dst="/usr/local/bin/${script_name}"
|
|
if [ -f ${map_vnets_script_dst} ]
|
|
then
|
|
# Already installed
|
|
exit 1
|
|
fi
|
|
|
|
|
|
map_vnets_script_src="$MOUNT_DIR/${script_name}"
|
|
|
|
cp "${map_vnets_script_src}" "${map_vnets_script_dst}"
|
|
chmod +x "${map_vnets_script_dst}"
|
|
|
|
(crontab -l ; echo "*/1 * * * * ${map_vnets_script_dst}") | crontab -
|
|
|
|
exit 0
|