[Eisfair_dev] [E1] Eigenes Paket erstellen ... Fragen

Marcus Roeckrath marcus.roeckrath at gmx.de
Fr Jun 17 16:02:29 CEST 2016


Hallo Helmut,

Marcus Roeckrath wrote:

>>> UPDATE_CHK_MOD        = 'console|mail|both'
>>>                        : 'only console, mail or both is allowed'
>>>
>>> ändern.
>> 
>> Mensch, so einfach! Man sollte doch mal öfter das Hirn einschalten ...
> 
> Jetzt die Kür:
> 
> Man kann das auch mittels eines Dialogs lösen, bei dem User nicht selbst
> die Option (korrekt) eintippen muss, sondern aus einer Dropdown-Litse
> auswählt.
> 
> Lust?

Ich schreibs einfach mal:

In der Checkdatei (.exp) den Eintrag von oben leicht modifiziert:

UPDATE_CHK_MOD_CUI    = 'console|mail|both'
                      : 'only console, mail or both is allowed'

In der normalen Checkdatei nun in der Spalte Value für diese
Konfigurationsoption:

UPDATE_CHK_MOD_CUI

eintragen.

Nun kreieren wir noch die Datei

/var/install/dialog.d/UPDATE_CHK_MOD_CUI.sh
(Rechte 0755)

mit folgendem Inhalt:

------------------schnipp---------------------------
#! /bin/sh
#------------------------------------------------------------------------------
# /var/install/dialog.d/UPDATE_CHK_MOD_CUI.sh - script dialog for ece
#
# Creation:     2016-06-16 Helmut Backhaus
# Last update:  2016-06-16 Helmut Backhaus
#
# Copyright (c) 2016 Helmut Backhaus
#
# 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.
#----------------------------------------------------------------------------

. /var/install/include/cuilib
. /var/install/include/ecelib

#
---------------------------------------------------------------------------
# exec_dailog
# ece --> request to create and execute dialog
#         $p2 --> main window handle
#         $p3 --> name of config variable
#
---------------------------------------------------------------------------
exec_dialog()
{
    win="${p2}"

    sellist='console,mail,both'

    ece_select_list_dlg "${win}" "Select update check mode" "${sellist}"
}
------------------schnapp---------------------------

Wer nun bei der Konfiguration ncurses und den ece benutzt, kann nun die
Option aus einem Menu wählen.

-- 
Gruss Marcus


Mehr Informationen über die Mailingliste Eisfair_dev