summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--samba-common.postinst7
1 files changed, 7 insertions, 0 deletions
diff --git a/samba-common.postinst b/samba-common.postinst
index 3dcbe19ad5..d29b07e57e 100644
--- a/samba-common.postinst
+++ b/samba-common.postinst
@@ -103,6 +103,13 @@ if [ -n "$2" ] && dpkg --compare-versions "$2" lt 3.0.28-3; then
cp "$TEMPLATE" "$NEWFILE"
configure_smb_conf "$NEWFILE"
+
+ if [ -e "$CONFIG" ]; then
+ sed -e '1,/^[;#[:space:]]*\[cdrom\]/ { d }
+ 1,/^[[:space:]]*\[/ { /^[^[]/d; /^$/d }
+ ' "$CONFIG" >> "$NEWFILE"
+ fi
+
ucf --three-way --debconf-ok "$NEWFILE" "$CONFIG"
fi