#!/usr/bin/sh #--------------------------------------------------------------------------- # /var/install/bin/pre-setup-services-dhcpd-plugins-menu # # Creation: 2018-09-29 hbfl # Last Update: $Id$ # # Copyright (c) 2018-@@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. #--------------------------------------------------------------------------- # create the modules file for dhcpd # that was found in the menu-root from the system # --------------------------------------------------------------------------- # create plugins menu # --------------------------------------------------------------------------- create_menu() { menu_files=$(ls /var/install/menu/setup.services.dhcpd.plugins.*.menu 2>/dev/null | awk -F. '{print $1"."$2"."$3"."$4"."$5"."$NF}' | uniq) { echo "" echo "dhcpd" echo "DHCP Server Plugins administration" echo "Plugin activation" for menu in ${menu_files} do package_entry="$(grep "" ${menu} | sed 's###g')" menu_entry="$(grep "title" ${menu} | sed 's###g')" echo "${menu_entry}" done } > ${menu_file} chmod 0640 ${menu_file} } # --------------------------------------------------------------------------- # main # --------------------------------------------------------------------------- main() { package_name="${2}" menu_file="${4}" create_menu } # --------------------------------------------------------------------------- # exec main # --------------------------------------------------------------------------- main "${@}" # --------------------------------------------------------------------------- # end # ---------------------------------------------------------------------------