Here is a patch to enable sysinstall to set 'sendmail_enable' value to
'YES', 'NO', and 'NONE'.  Current sysinstall can't set this value to
'NONE'; users who do *not* want to use sendmail can't stop sendmail
via sysinstall.

Following patch creates submenu to change the sendmail_enable value.
However, I don't know who want to set this variable to 'NO'.  If
selecting 'YES' and 'NONE' is enough, I'll try to make another patch.

Any comments?  I want to push this feature to 4.6-RELEASE...

-- -
Makoto `MAR' Matsushita

Index: menus.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/sysinstall/menus.c,v
retrieving revision 1.343
diff -u -r1.343 menus.c
--- menus.c     20 May 2002 17:08:00 -0000      1.343
+++ menus.c     31 May 2002 17:49:18 -0000
@@ -1372,11 +1372,31 @@
       { " Rwhod",      "This machine wants to run the rwho daemon",
        dmenuVarCheck,  dmenuToggleVariable, NULL, "rwhod_enable=YES" },
       { " Sendmail",   "This machine wants to run the sendmail daemon",
-       dmenuVarCheck,  dmenuToggleVariable, NULL, "sendmail_enable=YES" },
+       NULL,           dmenuSubmenu, NULL, &MenuSendmail },
       { " Sshd",       "This machine wants to run the ssh daemon",
        dmenuVarCheck,  dmenuToggleVariable, NULL, "sshd_enable=YES" },
       { " TCP Extensions", "Allow RFC1323 and RFC1644 TCP extensions?",
        dmenuVarCheck,  dmenuToggleVariable, NULL, "tcp_extensions=YES" },
+      { NULL } },
+};
+
+DMenu MenuSendmail = {
+    DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
+    "Sendmail Invocation Selection",
+    "There are three options for invocating sendmail at startup.\n"
+    "Please select Yes if you want to use sendmail as your mail transfer\n"
+    "agent.  Selecting No disables sendmail to open network socket for\n"
+    "incoming email, but still runs at startup.  None disables sendmail\n"
+    "completely at startup.",
+    NULL,
+    NULL,
+    {
+      { " Yes",                "Start sendmail",
+       dmenuVarCheck, dmenuSetVariable, NULL, "sendmail_enable=YES" },
+      { " No",         "Start sendmail, but don't listen from network",
+       dmenuVarCheck, dmenuSetVariable, NULL, "sendmail_enable=NO" },
+      { " None",       "Don't start any sendmail processes",
+       dmenuVarCheck, dmenuSetVariable, NULL, "sendmail_enable=NONE" },
       { NULL } },
 };
 
Index: sysinstall.h
===================================================================
RCS file: /home/ncvs/src/usr.sbin/sysinstall/sysinstall.h,v
retrieving revision 1.227
diff -u -r1.227 sysinstall.h
--- sysinstall.h        31 May 2002 13:38:17 -0000      1.227
+++ sysinstall.h        31 May 2002 17:49:19 -0000
@@ -407,6 +407,7 @@
 extern DMenu           MenuSysconsScrnmap;     /* System console screenmap 
configuration menu  */
 extern DMenu            MenuSysconsTtys;        /* System console terminal type menu  
          */
 extern DMenu           MenuNetworking;         /* Network configuration menu          
         */
+extern DMenu           MenuSendmail;           /* Sendmail configuration menu         
+         */
 extern DMenu           MenuInstallCustom;      /* Custom Installation menu            
         */
 extern DMenu           MenuDistributions;      /* Distribution menu                   
         */
 extern DMenu           MenuDiskDevices;        /* Disk type devices                   
         */

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to