Closed dreirund closed 11 months ago
Thanks for your proposal. I have added your changes to the master branch. I can currently not test it, but feel free to give corresponding feedback.
Thanks for your proposal. I have added your changes to the master branch. I can currently not test it, but feel free to give corresponding feedback.
Thanks.
WOICE="/usr/local/bin/woice"
is still static. Can you make WOICE="`which woice`"
, or just simply WOICE=woice
?
Patch: remove-nm-dispatcher-woice-path-hardcoding.patch.txt
.
Regards!
Added which variant to detect place where woice is installed.
I have made an Arch Linux package of this.
Feature requests:
Include in the build script that in the NetworkManager-script
examples/wifionice.sh
the now-statically set variableWOICE=/usr/local/bin/woice
is set during build to the place where thewoice
executable is installed (on a properly packaged installation that would be/usr/bin/woice
).Also,
${WOICE}
should then be replaced by"${WOICE}"
(i.e. with double quotes), so that "weird" path names do not lead to unexpected, potentially harmful, results. Similar with the$([...])
-calls in the script.Make the interface name to be passed to the script by NetworkManager, and not hardcoded.
According to this manpage for
NetworkManager-dispatcher
, the interface name should be passed to the script by the first argument. It might be interesting to read the whole manpage, since it explains all the information that is passed to the script.(I don't use NetworkManager, so I cannot help in that. I just want to package the software as useful as possible.)
So,
INTERFACE="wlp1s0"
could be changed toINTERFACE="$1"
.(In the beginning of the script you already set
interface=$1
, but you don't seem use this variable anymore.)To still work properly when more than one wireless interface is present/ configured,
iwgetid -r
should be changed toiwgetid "${INTERFACE}" -r
.Provide an installation option to automatically install the network manager script to a location where NetworkManager does find it, e.g.
/etc/NetworkManager/dispatcher.d/wifionice.sh
.I have attached the patch to
examples/wifionice.sh
that I personally use. Note that I have hardcodedWOICE="/usr/bin/woice"
there, since I am not familiar with python setuptools:nm-wifionice.sh-distributionready.patch.txt
. It has also some other changes (mostly adding"
, and removing spourious whitespace).Regards!