#! /bin/sh #---------------------------------------------------------------------------- # /var/install/bin/show-menu - show menu # # Copyright (c) 2001-2005 The Eisfair Team, c/o Frank Meyer, frank(at)eisfair(dot)org # # Creation: 2001-11-04 fm # Last Update: $Id: show-menu 9284 2007-01-20 15:04:42Z ansgar $ # # 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. #---------------------------------------------------------------------------- # include eislib . /var/install/include/eislib default_run_path='/var/install/bin' default_menu_path='/var/install/menu' default_config_path='/etc/config.d' default_doc_path='/usr/share/doc' default_init_path='/etc/init.d' menu_file="$1" menu_package="$2" url='' # check if screensize handling is available if [ "$_EISLIB_SCREENSIZE_Y" != '' ] then if check_screensize then # # define menus_per_page = _EISLIB_SCREENSIZE # - 2 Header Lines # - 2 Footer Lines # 0: Exit and # ask line let menus_per_page=${_EISLIB_SCREENSIZE_Y}-4 true else mecho -info "Return to calling script" exit 1 fi else # default if screensize handling is not available menus_per_page=18 fi if [ "$menu_package" != "" ] then PACKAGE="$menu_package" export PACKAGE fi ### read_menu_file ############################################################################# read_menu_file() { title='' n=0 while read line do case "$line" in '#'*|'