Hi, I have problems with the update-rc.d class in my recipes. When I want to update a package which inherits update-rc.d (in my case samba) using dpkg -i I get the following error: >root@host:~# dpkg -i /media/USBSTICK/samba-ads_3.5.22-r4_armel.deb >(Reading database ... 11931 files and directories currently installed.) >Preparing to replace samba-ads 3.5.22-r3 (using >.../samba-ads_3.5.22-r4_armel.deb) ... >Stopping Samba: smbd nmbd winbindd >Unpacking replacement samba-ads ... >update-rc.d: /etc/init.d/samba exists during rc.d purge (use -f to force) >dpkg: warning: subprocess old post-removal script returned error exit status 1 >dpkg: trying script from the new package instead ... >update-rc.d: /etc/init.d/samba exists during rc.d purge (use -f to force) >dpkg: error processing /media/USBSTICK/samba-ads_3.5.22-r4_armel.deb >(--install): > subprocess new post-removal script returned error exit status 1 >update-rc.d: /etc/init.d/samba exists during rc.d purge (use -f to force) >dpkg: error while cleaning up: > subprocess new post-removal script returned error exit status 1 >Errors were encountered while processing: > /media/USBSTICK/samba-ads_3.5.22-r4_armel.deb
When I afterwards want to remove/purge the package it fails with the following message: >root@host:~# dpkg -P samba-ads >dpkg: error processing samba-ads (--purge): > Package is in a very bad inconsistent state - you should > reinstall it before attempting a removal. >Errors were encountered while processing: > samba-ads The only way how to fix that problem is to manually remove the initscript and then install the update: >root@000C320C08C0:~# rm /etc/init.d/samba >root@000C320C08C0:~# dpkg -i /media/USBSTICK/samba-ads_3.5.22-r4_armel.deb >(Reading database ... 11931 files and directories currently installed.) >Preparing to replace samba-ads 3.5.22-r3 (using >.../samba-ads_3.5.22-r4_armel.deb) ... >Unpacking replacement samba-ads ... > Removing any system startup links for samba ... > /etc/rc0.d/K20samba > /etc/rc1.d/K20samba > /etc/rc2.d/S20samba > /etc/rc3.d/S20samba > /etc/rc4.d/S20samba > /etc/rc5.d/S20samba > /etc/rc6.d/K20samba >Setting up samba-ads (3.5.22-r4) ... > Adding system startup for /etc/init.d/samba. >Starting Samba: smbd nmbd winbindd. The update-rc.d part of my recipe is shown below. >inherit autotools update-rc.d >... >INITSCRIPT_NAME = "samba" >INITSCRIPT_PARAMS = "defaults" >... >do_install_append() { > ... > install -D -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/samba > ... >} Does anybody have an idea how to fix that issue? Would be really great! Thank you! Regards, Richard _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto