samba's package postinst script shouldn't return an error if samba daemon can't be started (e.g. if smb.conf file is incorrect or is removed)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
samba (Baltix) |
Invalid
|
Undecided
|
Unassigned | ||
samba (Ubuntu) |
Fix Released
|
Medium
|
Mathias Gug |
Bug Description
since a recent update, every time I try to install packages or to upgrade :
jonaternet@
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture de l'information d'état... Fait
0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
1 partiellement installés ou enlevés.
Il est nécessaire de prendre 0o dans les archives.
Après dépaquetage, 0o d'espace disque supplémentaires seront utilisés.
Souhaitez-vous continuer [O/n] ? o
Paramétrage de samba (3.0.22-1ubuntu4.1) ...
* Starting Samba daemons... [fail]
invoke-rc.d: initscript samba, action "start" failed.
dpkg : erreur de traitement de samba (--configure) :
le sous-processus post-installation script a retourné une erreur de sortie d'état 1
Des erreurs ont été rencontrées pendant l'exécution :
samba
E: Sub-process /usr/bin/dpkg returned an error code (1)
Related branches
description: | updated |
Changed in samba: | |
status: | New → Invalid |
Changed in samba: | |
assignee: | nobody → shawarma |
status: | Confirmed → In Progress |
Changed in samba: | |
assignee: | shawarma → mathiaz |
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 apt/archives/ samba_3. 0.22-1ubuntu4. 1_i386. deb 3.0.22- 1ubuntu4. 1_i386. deb) ... samba.. .
tomas@mazius:~$ sudo dpkg -i /var/cache/
Selecting previously deselected package samba.
(Reading database ... 156493 files and directories currently installed.)
Unpacking samba (from .../samba_
Setting up samba (3.0.22-1ubuntu4.1) ...
Generating /etc/default/
* 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.