Changeset 2630 for trunk


Ignore:
Timestamp:
Dec 17, 2009, 5:56:04 PM (15 years ago)
Author:
broder
Message:

Pass --no-start to dh_installinit in invirt-dev and run the initscript
by hand.

This works around a bug where init scripts are started before Python
modules have been fully installed.

Location:
trunk/packages/invirt-dev/debian
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-dev/debian/invirt-dev.postinst

    r2588 r2630  
    2121        fi
    2222
    23         invirt-build-conf
    24            
    2523        cat >>/etc/sudoers <<EOF
    2624### BEGIN invirt-dev
     
    2826### END invirt-dev
    2927EOF
     28
    3029        echo "-----"
    3130        echo "invirt-dev: run"
     
    4544    ;;
    4645esac
     46
     47if [ -x /etc/init.d/invirt-dev ]; then
     48    if hash invoke-rc.d 2>/dev/null; then
     49        invoke-rc.d invirt-dev start
     50    else
     51        /etc/init.d/invirt-dev start
     52    fi
     53fi
  • trunk/packages/invirt-dev/debian/invirt-dev.prerm

    r1782 r2630  
    2020case "$1" in
    2121    remove|upgrade|deconfigure)
    22         perl -i.bak -ne 's%^### (BEGIN|END) invirt-dev\s*$%%m && ($skip = ($1 eq "BEGIN")); print unless $skip;' /etc/sudoers
     22        perl -i.bak -ne 's%^### (BEGIN|END) invirt-dev\s*$%%m && ($skip = ($1 eq "BEGIN")); print unless $skip;' /etc/sudoers       
    2323    ;;
    2424
     
    3232esac
    3333
     34if [ -x /etc/init.d/invirt-dev ]; then
     35    if hash invoke-rc.d 2>/dev/null; then
     36        invoke-rc.d invirt-dev stop
     37    else
     38        /etc/init.d/invirt-dev stop
     39    fi
     40fi
     41
    3442# dh_installdeb will replace this with shell code automatically
    3543# generated by other debhelper scripts.
  • trunk/packages/invirt-dev/debian/rules

    r2627 r2630  
    22
    33DEB_PYTHON_SYSTEM=pysupport
     4
     5# We use --no-start instead of letting dh_installinit do its thing
     6# because, in the postinst, dh_installinit's automatically added code
     7# runs before dh_pysupport's automatically added code.
     8#
     9# This means that when the initscript is started, Python modules
     10# installed by the package haven't been fully installed yet.
     11DEB_DH_INSTALLINIT_ARGS += --no-start
    412
    513include /usr/share/cdbs/1/rules/debhelper.mk
Note: See TracChangeset for help on using the changeset viewer.