#pragma implementation #include "liloconf.h" #include "liloconf.m" #include #include MODULE_DEFINE_VERSION(liloconf); static const char *keymenu=NULL; extern HELP_FILE help_lilo; ("liloconf",PACKAGE_REV); tb.add (new SSTRING(MSG_U(T_USAGE ,"linuxconf --modulemain liloconf usage\n" "\n" " liloconf --option ...\n"))); if (context == MENU_BOOT){ keymenu = MSG_U(M_liloconf,"Lilo"); dia.new_menuitem ("liloconf","",keymenu); } if (level == 0) lilo_update(); return 0; if (context == MENU_BOOT && key == keymenu){ static const char *lilo_defaults = MSG_U(M_LILO,"LILO defaults (Linux boot loader)"); static const char *lilo_linux = MSG_U(M_LILOLINUX,"LILO linux configurations"); static const char *lilo_others = MSG_U(M_LILOOTHERS,"LILO other OS configurations"); static const char *lilo_default = MSG_U(M_DEFLILO,"default boot configuration"); static const char *lilo_confaddany = MSG_U(M_NEWKERN,"a new kernel"); static const char *lilo_confaddcompil = MSG_U(M_COMPILED,"a kernel you have compiled"); static const char *menuopt[]={ MSG_U(M_CONFIG,"Configure"), lilo_defaults, "", lilo_linux, "", lilo_others, MSG_U(M_CHANGE,"Change"), lilo_default, MSG_U(M_ADDLILO,"Add to LILO"), lilo_confaddany, "", lilo_confaddcompil, NULL }; (MSG_R(M_liloconf),"",help_lilo,menuopt); if (perm_rootaccess(MSG_U(P_LILO,"manage LILO configuration"))){ if (no == 0){ lilo_editdefaults(); }else if (no == 1){ lilo_editlinux(); }else if (no == 2){ lilo_editothers(); }else if (no == 3){ lilo_setdefault(); }else if (no == 4){ lilo_addany(); }else if (no == 5){ lilo_addcompil(); } } } return 0; int ret = LNCF_NOT_APPLICABLE; #if 0 // ### Check the variable key to provide your own html hook ret = 0; #endif return ret; int ret = -1; if (argc == 1){ // ### Place here a call to the main menu }else{ printusage(); } return ret;