#!/usr/bin/sh #---------------------------------------------------------------------------- # /var/install/bin/pre-setup-system-base-edit - get number of network cards # # Creation: 2024-09-04 hbfl # Last Update: $Id$ # # Copyright (c) 2001-@@YEAR@@ the eisfair team, team(at)eisfair(dot)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 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- package_name=base # check for pci network cards pci_dev=$(lspci -nn | grep -c 'Ethernet controller') # check for usb network cards usb_dev=$(ls -la /sys/class/net/ | grep -c usb) # count net_dev=$((${pci_dev} + ${usb_dev})) #update base.ext sed -i "/^set net_devices/ s|=.*$|=${net_dev:-1}|" /etc/check.d/base.ext