#!/bin/sh #------------------------------------------------------------------------------ # /var/install/bin/pre-setup-services-geoipupdate-modules-menu # # Creation : 2020-11-08 hbfl # Last Update: $Id$ # # Copyright (c) 2020-@@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 module file for subversion # that was found in the menu-root from the system # --------------------------------------------------------------------------- # create modules menu # --------------------------------------------------------------------------- create_modules_menu() { menu_files=$(ls /var/install/menu/setup.services.geoipupdate.modules.*.menu 2>/dev/null | awk -F. '{print($1"."$2"."$3"."$4"."$5"."$NF)}' | uniq) { echo "" echo "geoipupdate" echo "GeoIP module administration" 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() { menu_file="${4}" create_modules_menu exit 0 } # --------------------------------------------------------------------------- # exec main # --------------------------------------------------------------------------- main "${@}" # --------------------------------------------------------------------------- # end # ---------------------------------------------------------------------------