[Pkg-samba-maint] r795 - trunk

Christian Perrier bubulle at costa.debian.org
Sun Dec 11 08:49:08 UTC 2005


Author: bubulle
Date: 2005-12-11 08:49:07 +0000 (Sun, 11 Dec 2005)
New Revision: 795

Modified:
   trunk/changelog
   trunk/samba.config
Log:
Preserve admin settings in /etc/default/samba


Modified: trunk/changelog
===================================================================
--- trunk/changelog	2005-12-05 08:05:14 UTC (rev 794)
+++ trunk/changelog	2005-12-11 08:49:07 UTC (rev 795)
@@ -3,8 +3,10 @@
   * Remove the smbldap-tools-* directory from the examples of samba-doc
     as these tools exist as an independent package. Closes: #341934
   * Swedish debconf translation update. Closes: #342022
+  * Preserve the local admin settings for run_mode in /etc/default/samba
+    when upgrading. Closes: #234038, #267988, #269735
 
- -- Christian Perrier <bubulle at debian.org>  Sun,  4 Dec 2005 19:03:33 +0100
+ -- Christian Perrier <bubulle at debian.org>  Sun, 11 Dec 2005 09:46:58 +0100
 
 samba (3.0.20b-3) unstable; urgency=low
 

Modified: trunk/samba.config
===================================================================
--- trunk/samba.config	2005-12-05 08:05:14 UTC (rev 794)
+++ trunk/samba.config	2005-12-11 08:49:07 UTC (rev 795)
@@ -5,6 +5,9 @@
 # Source debconf library.
 . /usr/share/debconf/confmodule
 
+DEFAULTRUNMODE="daemons"
+RCFILE=/etc/default/samba
+
 # Function for grabbing a parameter from an smb.conf file
 smbconf_retr() {
 	if [ -z "$1" ]; then
@@ -27,6 +30,20 @@
 	| tail -n 1
 }
 
+read_rcfile() {
+    # Default values
+    if [ -f $RCFILE ]; then
+	RUN_MODE="$DEFAULTRUNMODE"
+	. $RCFILE || true
+    fi
+}
+
+set_debconf() {
+    if [ "$RUN_MODE" ]; then
+        db_set samba/run_mode "$RUN_MODE" || true
+    fi
+}
+
 FILE=/etc/samba/smb.conf
 
 db_title "Samba Server"
@@ -38,6 +55,12 @@
 	db_go
 fi
 
+
+# We first read the settings file
+# in order to get admin-modified settings
+read_rcfile
+# Debconf-stored values are updated accordingly
+set_debconf
 db_input medium samba/run_mode || true
 db_go
 




More information about the Pkg-samba-maint mailing list