PGNd
2014-Aug-21 14:28 UTC
SW segfault on 'tcstart' exec of external QoS/tc script; debug?
I'm adapting an external ToS script I've used previously, standalone, https://github.com/k0smik0/e-hfsc for use in Shorewall (4.6.2.5). I've modified its vars to use values from /params, changed use of 'tc' -> 'tun_tc', etc, and added it to lib.private as qos_control() { ... case "$1" in status) status exit ;; stop) delete_for_uplink delete_for_downlink exit ;; start) set_rules_for_uplink set_rules_for_downlink exit ;; restart) delete_for_uplink delete_for_downlink set_rules_for_uplink set_rules_for_downlink exit ;; *) echo "$(basename $0) start|stop|status|restart" exit ;; esac } I mod'd SW conf to use an external script /shorewall.conf ... CLEAR_TC=Yes TC_ENABLED=Yes TC_EXPERT=No ... and invoke it as /tcstart qos_control start /tcstop qos_control stop On local-compile/remote-push of the script, @tcstart segfaults ... Adding Providers... Setting up Traffic Control... Processing /usr/local/etc/shorewall/tcstart user exit ... /usr/share/shorewall/lib.common: line 113: 30099 Segmentation fault $SHOREWALL_SHELL $script $options $@ where cat /usr/share/shorewall/lib.common # # Do required exports or create the required option string and run the passed script using # $SHOREWALL_SHELL # 113 run_it() { local script local options The unmodified script works outside of SW; the mod'd script segfaults when exec'd from inside of SW. How do I get at the right SW debug info *locally* to determine what's causing that segfault on the *remote* @tcstart? ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/