summaryrefslogtreecommitdiff
path: root/src/etc/netplug
diff options
context:
space:
mode:
Diffstat (limited to 'src/etc/netplug')
-rwxr-xr-xsrc/etc/netplug/linkup.d/vyos-python-helper4
-rwxr-xr-xsrc/etc/netplug/netplug41
-rw-r--r--src/etc/netplug/netplugd.conf4
-rwxr-xr-xsrc/etc/netplug/vyos-netplug-dhcp-client57
4 files changed, 0 insertions, 106 deletions
diff --git a/src/etc/netplug/linkup.d/vyos-python-helper b/src/etc/netplug/linkup.d/vyos-python-helper
deleted file mode 100755
index 9c59c58ad..000000000
--- a/src/etc/netplug/linkup.d/vyos-python-helper
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-PYTHON3=$(which python3)
-# Call the real python script and forward commandline arguments
-$PYTHON3 /etc/netplug/vyos-netplug-dhcp-client "${@:1}"
diff --git a/src/etc/netplug/netplug b/src/etc/netplug/netplug
deleted file mode 100755
index 60b65e8c9..000000000
--- a/src/etc/netplug/netplug
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/sh
-#
-# Copyright 2023 VyOS maintainers and contributors <maintainers@vyos.io>
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library 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
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library. If not, see <http://www.gnu.org/licenses/>.
-
-dev="$1"
-action="$2"
-
-case "$action" in
-in)
- run-parts --arg $dev --arg in /etc/netplug/linkup.d
- ;;
-out)
- run-parts --arg $dev --arg out /etc/netplug/linkdown.d
- ;;
-
-# probe loads and initialises the driver for the interface and brings the
-# interface into the "up" state, so that it can generate netlink(7) events.
-# This interferes with "admin down" for an interface. Thus, commented out. An
-# "admin up" is treated as a "link up" and thus, "link up" action is executed.
-# To execute "link down" action on "admin down", run appropriate script in
-# /etc/netplug/linkdown.d
-#probe)
-# ;;
-
-*)
- exit 1
- ;;
-esac
diff --git a/src/etc/netplug/netplugd.conf b/src/etc/netplug/netplugd.conf
deleted file mode 100644
index 7da3c67e8..000000000
--- a/src/etc/netplug/netplugd.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-eth*
-br*
-bond*
-wlan*
diff --git a/src/etc/netplug/vyos-netplug-dhcp-client b/src/etc/netplug/vyos-netplug-dhcp-client
deleted file mode 100755
index 4cc824afd..000000000
--- a/src/etc/netplug/vyos-netplug-dhcp-client
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/env python3
-#
-# Copyright 2023-2025 VyOS maintainers and contributors <maintainers@vyos.io>
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library 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
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library. If not, see <http://www.gnu.org/licenses/>.
-
-import sys
-
-from time import sleep
-
-from vyos.config import Config
-from vyos.configdict import get_interface_dict
-from vyos.ifconfig import Interface
-from vyos.ifconfig import Section
-from vyos.utils.boot import boot_configuration_complete
-from vyos.utils.commit import commit_in_progress
-from vyos import airbag
-
-airbag.enable()
-
-if len(sys.argv) < 3:
- airbag.noteworthy('Must specify both interface and link status!')
- sys.exit(1)
-
-if not boot_configuration_complete():
- airbag.noteworthy('System bootup not yet finished...')
- sys.exit(1)
-
-interface = sys.argv[1]
-# helper scripts should only work on physical interfaces not on individual
-# sub-interfaces. Moving e.g. a VLAN interface in/out a VRF will also trigger
-# this script which should be prohibited - bail out early
-if '.' in interface:
- sys.exit(0)
-
-while commit_in_progress():
- sleep(1)
-
-in_out = sys.argv[2]
-config = Config()
-
-interface_path = ['interfaces'] + Section.get_config_path(interface).split()
-_, interface_config = get_interface_dict(
- config, interface_path[:-1], ifname=interface, with_pki=True
-)
-Interface(interface).update(interface_config)