Ignore:
Timestamp:
Dec 28, 2008, 12:25:35 AM (16 years ago)
Author:
price
Message:

xvm-iscsi-config: don't restart on upgrade, only first install

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/xvm-iscsi-config/debian/xvm-iscsi-config.postinst

    r1510 r1923  
    4242 password: $PASSWORD
    4343EOF
    44         invoke-rc.d xvm-iscsi-config restart
    45         invoke-rc.d open-iscsi restart
    46         iscsiadm -m discovery -t st -p $(invirt-getconf iscsi.address):3260
     44        if [ -z "$2" ]; then
     45            invoke-rc.d xvm-iscsi-config restart
     46            invoke-rc.d open-iscsi restart
     47            iscsiadm -m discovery -t st -p $(invirt-getconf iscsi.address):3260
     48        else
     49            # Don't disrupt an existing installation.
     50            cat <<EOF
     51xvm-iscsi-config: If the configuration has changed, restart iscsi:
     52  /etc/init.d/xvm-iscsi-config restart
     53  /etc/init.d/open-iscsi restart
     54  iscsiadm -m discovery -t st -p $(invirt-getconf iscsi.address):3260
     55  lvchange -a ln /dev/xenvg && lvchange -a y /dev/xenvg
     56This will leave VMs unable to access their disks, so migrate them first.
     57
     58EOF
     59        fi
    4760    ;;
    4861
Note: See TracChangeset for help on using the changeset viewer.