Issues with update script
Closed this issue · 1 comments
ScottGuymer commented
I spent some time implementing this yesterday and ran into some issues with the udpate script
I found that i had to re-order the commands so that configure
was run first to enter the mode and then the other commands..
i ended up with
#!/bin/vbash
source /opt/vyatta/etc/functions/script-template
configure
r_ip=$(run show dhcp client leases | grep router | awk '{ print $3 }');
iptv_static=$(echo "set protocols static route 213.75.112.0/21 next-hop $r_ip")
delete protocols static route 213.75.112.0/21
eval $iptv_static
commit
save
exit
Not sure if this is as a result of OS changes on the router or if its the fact i am using the smaller 3 port router.
Happy to open a PR if you think its worthwhile.
basmeerman commented
Scott thanks for the contribution. I merged your PR. Kind regards.