[Cerowrt-devel] [sqm-scripts] not started at boot?
Sebastian Moeller
moeller0 at gmx.de
Sun Feb 15 10:48:09 EST 2015
Hi Toke,
On Feb 15, 2015, at 16:00 , Toke Høiland-Jørgensen <toke at toke.dk> wrote:
> Alan Jenkins <alan.christopher.jenkins at gmail.com> writes:
>
>> It's very effective, but I notice SQM isn't applied at boot time. The
>> system log complains about pppoe-wan interface not existing, when the
>> sqm init script is started.
>
> Ah, that makes sense I suppose: PPPOE is probably brought up too late
> for the SQM init script to pick it up.
>
>> qos-scripts has a hotplug script, so I copied it for sqm and the
>> problem is "fixed". Though my stupid script re-runs the sqm as every
>> single network interface comes up, so it spams the log and probably
>> slows things down a bit. (Maybe sqm script also wants to not be so
>> noisy in the log)
>
> I'm attaching an updated version of the run.sh script which should
> detect when it is run from hotplug and only apply the SQM config to the
> hotplugged interface. Could you verify that this works for you? If so,
> I'll push an update with the revision and include a hotplug script. :)
I am not sure that this works as intended. The first thing run.sh does is take down all running SQM instances:
PROTO_STATE_FILE_LIST=$( ls ${ACTIVE_STATE_FILE_DIR}/${ACTIVE_STATE_PREFIX}* 2> /dev/null )
for STATE_FILE in ${PROTO_STATE_FILE_LIST} ; do
if [ -f ${STATE_FILE} ] ;
then
STATE_FILE_BASE_NAME=$( basename ${STATE_FILE} )
CURRENT_INTERFACE=${STATE_FILE_BASE_NAME:${#ACTIVE_STATE_PREFIX}:$(( ${#STATE_FILE_BASE_NAME} - ${#ACTIVE_STATE_PREFIX} ))}
logger -t SQM -s "${0} Stopping SQM on interface: ${CURRENT_INTERFACE}"
/usr/lib/sqm/stop.sh ${CURRENT_INTERFACE}
rm ${STATE_FILE} # well, we stop it so it is not running anymore and hence no active state file needed...
fi
done
before diving into the individual coin fig sections. And all instances that were stopped better be restarted unless their configuration changed. (The current SQM scripts allow multiple concurrent active instances,it would be nice to keep that capability).
Best Regards
Sebastian
>
> -Toke
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: run.sh
Type: text/x-sh
Size: 4091 bytes
Desc: not available
URL: <https://lists.bufferbloat.net/pipermail/cerowrt-devel/attachments/20150215/2fc4f234/attachment-0002.sh>
-------------- next part --------------
> _______________________________________________
> Cerowrt-devel mailing list
> Cerowrt-devel at lists.bufferbloat.net
> https://lists.bufferbloat.net/listinfo/cerowrt-devel
More information about the Cerowrt-devel
mailing list