public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
* [RFC PATCH 1/2] red: Update to use ip in place of deprecated vconfig
@ 2025-06-09 13:32 Adolf Belka
  2025-06-09 13:32 ` [RFC PATCH 2/2] vlan: Removal of package after replacement of vconfig commands with ip commands Adolf Belka
  0 siblings, 1 reply; 2+ messages in thread
From: Adolf Belka @ 2025-06-09 13:32 UTC (permalink / raw)
  To: development; +Cc: Adolf Belka

- I noticed that the vlan package was last updated in 2005 and that the vconfig site said
   that 802.1Q VLAN code is part of the official kernel, and has been for years and
   years. It is very unlikely that you need to download anything from this site, the
   packages are left here for posterity's sake. 802.1Q VLANs can be created with the
   'ip' utility (vconfig works for vlans, but is crufty and deprecated).
- Based on this it seemed appropriate to replace the vconfig commands with ip commands.
- This patch set has been sent as an RFC PATCH as my replacement ip commands may or may
   not be correct and I am unable to test the effect as I do not have a pppoe connection
   using vlans.
- I am open to any modifications or any other decision with reagard to the vlan package

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 src/initscripts/networking/red | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/initscripts/networking/red b/src/initscripts/networking/red
index fddc70d92..6d779b365 100644
--- a/src/initscripts/networking/red
+++ b/src/initscripts/networking/red
@@ -251,7 +251,7 @@ case "${1}" in
 			if [ "$TYPE" == "vdsl" ]; then
 				boot_mesg "Creating VLAN Interface ${DEVICE}.${INET_VLAN} ..."
 				modprobe 8021q
-				vconfig add ${DEVICE} ${INET_VLAN}
+				ip link add link ${DEVICE} name ${DEVICE}.${INET_VLAN} type vlan id ${INET_VLAN}
 				if [ -n "$MAC1" ]; then
 					boot_mesg "Setting mac address on ${DEVICE}.${INET_VLAN} to ${MAC1}"	
 					ip link set dev ${DEVICE}.${INET_VLAN} address ${MAC1}
@@ -276,7 +276,7 @@ case "${1}" in
 				if [ ! -f "$PIDFILE" ]; then
 					boot_mesg "Creating VLAN Interface ${DEVICE}.${IPTV_VLAN} ..."
 					modprobe 8021q
-					vconfig add ${DEVICE} ${IPTV_VLAN}
+					ip link add link ${DEVICE} name ${DEVICE}.${IPTV_VLAN} type vlan id ${IPTV_VLAN}
 					if [ -n "$MAC2" ]; then
 						boot_mesg "Setting mac address on ${DEVICE}.${IPTV_VLAN} to ${MAC2}"
 						ip link set dev ${DEVICE}.${IPTV_VLAN} address ${MAC2}
@@ -548,7 +548,7 @@ case "${1}" in
 				if echo "${link_status}" | grep -q UP; then
 					boot_mesg "Bringing down the ${DEVICE}.${INET_VLAN} interface..."
 					ip link set ${DEVICE}.${INET_VLAN} down
-					vconfig rem ${DEVICE}.${INET_VLAN}
+					ip link delete ${DEVICE}.${INET_VLAN}
 					evaluate_retval
 				fi
 			else
-- 
2.49.0



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [RFC PATCH 2/2] vlan: Removal of package after replacement of vconfig commands with ip commands
  2025-06-09 13:32 [RFC PATCH 1/2] red: Update to use ip in place of deprecated vconfig Adolf Belka
@ 2025-06-09 13:32 ` Adolf Belka
  0 siblings, 0 replies; 2+ messages in thread
From: Adolf Belka @ 2025-06-09 13:32 UTC (permalink / raw)
  To: development; +Cc: Adolf Belka

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 config/rootfiles/common/vlan |  1 -
 lfs/vlan                     | 76 ------------------------------------
 make.sh                      |  1 -
 3 files changed, 78 deletions(-)
 delete mode 100644 config/rootfiles/common/vlan
 delete mode 100644 lfs/vlan

diff --git a/config/rootfiles/common/vlan b/config/rootfiles/common/vlan
deleted file mode 100644
index 9d7eb4cf0..000000000
--- a/config/rootfiles/common/vlan
+++ /dev/null
@@ -1 +0,0 @@
-sbin/vconfig
diff --git a/lfs/vlan b/lfs/vlan
deleted file mode 100644
index a472df5ee..000000000
--- a/lfs/vlan
+++ /dev/null
@@ -1,76 +0,0 @@
-###############################################################################
-#                                                                             #
-# IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2018  IPFire Team  <info@ipfire.org>                     #
-#                                                                             #
-# This program is free software: you can redistribute it and/or modify        #
-# it under the terms of the GNU General Public License as published by        #
-# the Free Software Foundation, either version 3 of the License, or           #
-# (at your option) any later version.                                         #
-#                                                                             #
-# This program is distributed in the hope that it will be useful,             #
-# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
-# GNU General Public License for more details.                                #
-#                                                                             #
-# You should have received a copy of the GNU General Public License           #
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
-#                                                                             #
-###############################################################################
-
-###############################################################################
-# Definitions
-###############################################################################
-
-include Config
-
-VER        = 1.9
-
-THISAPP    = vlan.$(VER)
-DL_FILE    = $(THISAPP).tar.gz
-DL_FROM    = $(URL_IPFIRE)
-DIR_APP    = $(DIR_SRC)/vlan
-TARGET     = $(DIR_INFO)/$(THISAPP)
-
-###############################################################################
-# Top-level Rules
-###############################################################################
-
-objects = $(DL_FILE)
-
-$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-
-$(DL_FILE)_BLAKE2 = 195acf3d3bf12de3d11856ec3fdab9791d744af8a5c0003d42a2dd8dda5b22d92bdb43aac392a2c3281cf43f67c2b05dc442352f1cfb589bc540593a92a2a46d
-
-install : $(TARGET)
-
-check : $(patsubst %,$(DIR_CHK)/%,$(objects))
-
-download :$(patsubst %,$(DIR_DL)/%,$(objects))
-
-b2 : $(subst %,%_BLAKE2,$(objects))
-
-###############################################################################
-# Downloading, checking, b2sum
-###############################################################################
-
-$(patsubst %,$(DIR_CHK)/%,$(objects)) :
-	@$(CHECK)
-
-$(patsubst %,$(DIR_DL)/%,$(objects)) :
-	@$(LOAD)
-
-$(subst %,%_BLAKE2,$(objects)) :
-	@$(B2SUM)
-
-###############################################################################
-# Installation Details
-###############################################################################
-
-$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
-	@$(PREBUILD)
-	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
-	cd $(DIR_APP) && make purge vconfig
-	cd $(DIR_APP) && install -c -p -m 0755 vconfig /sbin
-	@rm -rf $(DIR_APP)
-	@$(POSTBUILD)
diff --git a/make.sh b/make.sh
index 25489a2f1..f558de5e1 100755
--- a/make.sh
+++ b/make.sh
@@ -1791,7 +1791,6 @@ build_system() {
 	lfsmake2 calamaris
 	lfsmake2 tcpdump
 	lfsmake2 traceroute
-	lfsmake2 vlan
 	lfsmake2 wireless
 	lfsmake2 pakfire
 	lfsmake2 lz4
-- 
2.49.0



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-06-09 13:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-09 13:32 [RFC PATCH 1/2] red: Update to use ip in place of deprecated vconfig Adolf Belka
2025-06-09 13:32 ` [RFC PATCH 2/2] vlan: Removal of package after replacement of vconfig commands with ip commands Adolf Belka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox