Comment 1 for bug 85194

Revision history for this message
Mantas Kriaučiūnas (mantas) wrote : samba's package postinst script shouldn't return an error if samba daemon can't be started (for example if /etc/samba/smb.conf file is incorrect or is removed)

It seems the problem is in samba's package postinst script - it returns an error if samba daemon can't be started (for example if /etc/samba/smb.conf file is incorrect or is removed):

tomas@mazius:~$ sudo rm /etc/samba/smb.conf
tomas@mazius:~$ sudo dpkg -i /var/cache/apt/archives/samba_3.0.22-1ubuntu4.1_i386.deb
Selecting previously deselected package samba.
(Reading database ... 156493 files and directories currently installed.)
Unpacking samba (from .../samba_3.0.22-1ubuntu4.1_i386.deb) ...
Setting up samba (3.0.22-1ubuntu4.1) ...
Generating /etc/default/samba...
 * Starting Samba daemons... [fail]
invoke-rc.d: initscript samba, action "start" failed.
dpkg: error processing samba (--install):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 samba
tomas@mazius:~$

Solution is return only warning "Samba daemon can't be started, please check your samba configuration" instead of returning error exit status 1

Btw, /etc/samba/smb.conf file is the config file of another package - samba-common, so, AFAIK, we are not following to the packaging policy when postinst script assumes, that we should have correct config file from another package.