On 9/3/20 5:44 PM, Tim Tassonis via blfs-dev wrote:
On 9/3/20 10:29 PM, Pierre Labastie via blfs-dev wrote:
On Thu, 2020-09-03 at 21:47 +0200, Tim Tassonis via blfs-dev wrote:
On 9/1/20 7:55 PM, Bruce Dubbs via blfs-dev wrote:
On 9/1/20 12:24 PM, Tim Tassonis via blfs-dev wrote:
Hi all
As one of Switzerland largest ISP's requires pppoe with vlan
tagging
for fiber connections, I wondered if vlan tagging could get
supported
in the network scripts.
As I found out via https://wiki.archlinux.org/index.php/VLAN, one
can
create a tagged VLAN using
ip link add link $REAL_IFACE name $VLAN_IFACE type vlan id
$VLAN_ID
, so I guess this could be implemented by
- checking for $VLAN_IFACE and $VLAN_ID being set
- checking for $VLAN_ID and $REAL_IFACE (in which case IFACE
then
holds the $VLAN_IFACE)
The latter would probably be more consistent with other network
stuff,
where iface always holds the resulting interface, and not the
physical
one.
I could add this to /lib/services/pppoe, if anyone else cares.
I'm not
sure if, apart from pppoe, anyone else is interested in vlan
stuff.
I'm not even sure /lib/services/pppoe is still in blfs....
If yes, I could also add this to ipv4-static and dhcpcd.
Tim, Can you send me a patch that I can review? I would want to
make
sure that changes will not affect users that do not need them.
The patch against the pppoe service file I got is as follows:
--- pppoe-service 2018-04-18 19:18:07.739547066 +0200
+++ pppoe-service-vlan 2020-09-03 21:37:27.613134901 +0200
@@ -46,11 +46,24 @@
exit 1
fi
+if [ "x${REAL_IFACE}" != "x" ] && [ "x$x${REAL_IFACE}" != "x" ]
I'm not sure what you want to do above: if the first test is true, the
second is true too, whatever the value of $x. Typo?
Correct, "x$x${REAL_IFACE}" is a typo, it should read:
if [ "x${REAL_IFACE}" != "x" ] && [ "x${REAL_IFACE}" != "x" ]
Like this, it is a very portable way to check if both of those variables
have any defined value. But there may be a bash shortcut, maybe:
if [ -s "${REAL_IFACE}" ] && [ -s "x${REAL_IFACE}" ]
I'm not sure, though, if that would also be correct. The first one will
certainly work with any possible sh-like shell.
Those variables really look the same to me:
if [ "x${REAL_IFACE}" != "x" ] &&
[ "x${REAL_IFACE}" != "x" ]
What am I missing?
-- Bruce
--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page