summaryrefslogtreecommitdiffstats
path: root/packaging/Debian/debian/samba.config
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-05-02 20:20:29 +0000
committerGerald Carter <jerry@samba.org>2002-05-02 20:20:29 +0000
commitfcb4e6869a2381c45d1f9103b801f3c79292a682 (patch)
treefdead0ec56f4dfed112487183bcf26529b4677df /packaging/Debian/debian/samba.config
parent447ea60378cee901cb6b7970e8e127a9dd2ec4f0 (diff)
downloadsamba-fcb4e6869a2381c45d1f9103b801f3c79292a682.tar.gz
samba-fcb4e6869a2381c45d1f9103b801f3c79292a682.tar.xz
samba-fcb4e6869a2381c45d1f9103b801f3c79292a682.zip
merge
Diffstat (limited to 'packaging/Debian/debian/samba.config')
-rw-r--r--packaging/Debian/debian/samba.config45
1 files changed, 45 insertions, 0 deletions
diff --git a/packaging/Debian/debian/samba.config b/packaging/Debian/debian/samba.config
new file mode 100644
index 00000000000..fe26040ef57
--- /dev/null
+++ b/packaging/Debian/debian/samba.config
@@ -0,0 +1,45 @@
+#/bin/sh -e
+#
+# $Id: samba.config,v 1.1.4.1 2002/05/02 20:20:28 jerry Exp $
+#
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+
+db_title "Samba Server"
+
+# Babysit users who don't read README.Debian
+db_input medium samba/log_files_moved || true
+db_go
+
+db_input medium samba/run_mode || true
+db_go
+
+# We vary the priority of the next question depending on whether
+# /etc/samba/smbpasswd already exists...
+if [ -f /etc/samba/smbpasswd ]; then
+ PRIORITY="low"
+else
+ # If 'encrypt passwords' is true in smb.conf, and smbpasswd
+ # does not exist, default to yes here.
+ FILE=/etc/samba/smb.conf
+ if [ -f "$FILE" ]; then
+ ENCRYPT=`grep -i '^[[:space:]]*encrypt passwords[[:space:]]*=' $FILE \
+ | sed -e's/^[[:space:]]*encrypt passwords[[:space:]]*=[[:space:]]*//i' \
+ | tail -1`
+ if [ "$ENCRYPT" ]; then
+ ENCRYPT=`echo $ENCRYPT | tr '[A-Z]' '[a-z]'`
+ if [ "$ENCRYPT" = "yes" ]; then
+ ENCRYPT=true
+ fi
+ if [ "$ENCRYPT" = "no" ]; then
+ ENCRYPT=false
+ fi
+ fi
+ db_set samba/generate_smbpasswd "$ENCRYPT"
+ fi
+ PRIORITY="medium"
+fi
+
+db_input $PRIORITY samba/generate_smbpasswd || true
+db_go