7 # Do debconf stuff here
8 .
/usr
/share
/debconf
/confmodule
10 # We need a default smb.conf file. If one doesn't exist we put in place
11 # one that has some basic defaults.
12 if [ ! -e /etc
/samba
/smb.conf
]; then
13 cp -a /usr
/share
/samba
/smb.conf
/etc
/samba
/
16 # ------------------------- Debconf questions start ---------------------
18 # Is the user configuring with debconf, or he/she prefers swat/manual
20 db_get samba-common
/do_debconf || true
21 if [ "${RET}" = "true" ]; then
23 db_get samba-common
/workgroup || true
26 TMPFILE
=`mktemp -q /tmp/smb.conf.XXXXXX`
27 sed -e "s/^\([[:space:]]*\)workgroup[[:space:]]*=.*/\1workgroup = ${WORKGROUP}/" \
28 < /etc
/samba
/smb.conf
>${TMPFILE}
29 mv -f ${TMPFILE} /etc
/samba
/smb.conf
32 db_get samba-common
/encrypt_passwords || true
33 ENCRYPT_PASSWORDS
="${RET}"
35 TMPFILE
=`mktemp -q /tmp/smb.conf.XXXXXX`
36 sed -e "s/^\([[:space:]]*\)encrypt passwords[[:space:]]*=.*/\1encrypt passwords = ${ENCRYPT_PASSWORDS}/" \
37 < /etc
/samba
/smb.conf
>${TMPFILE}
38 mv -f ${TMPFILE} /etc
/samba
/smb.conf
41 chmod a
+r
/etc
/samba
/smb.conf
43 # ------------------------- Debconf questions end ---------------------