diff options
-rw-r--r-- | Makefile.am | 7 | ||||
-rwxr-xr-x | scripts/etc-IPaddr2-vyatta | 2 | ||||
-rwxr-xr-x | scripts/ocf-IPaddr2-vyatta | 16 |
3 files changed, 9 insertions, 16 deletions
diff --git a/Makefile.am b/Makefile.am index 9531f18..f74c4e2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,6 +3,9 @@ opdir = $(datadir)/vyatta-op/templates share_perl5dir = $(datadir)/perl5 curverdir = $(sysconfdir)/config-migrate/current +etc_ha_resourcedir = /etc/ha.d/resource.d +lib_ocf_resourcedir = /usr/lib/ocf/resource.d/heartbeat + sbin_SCRIPTS = scripts/vyatta-update-cluster.pl sbin_SCRIPTS += scripts/vyatta-show-cluster.pl @@ -13,6 +16,10 @@ cpiop = find . ! -regex '\(.*~\|.*\.bak\|.*\.swp\|.*\#.*\#\)' -print0 | \ cpio -0pd install-exec-hook: + mkdir -p $(DESTDIR)$(etc_ha_resourcedir) + cp scripts/etc-IPaddr2-vyatta $(DESTDIR)$(etc_ha_resourcedir)/IPaddr2-vyatta + mkdir -p $(DESTDIR)$(lib_ocf_resourcedir) + cp scripts/ocf-IPaddr2-vyatta $(DESTDIR)$(lib_ocf_resourcedir)/IPaddr2-vyatta mkdir -p $(DESTDIR)$(cfgdir) cd templates-cfg; $(cpiop) $(DESTDIR)$(cfgdir) mkdir -p $(DESTDIR)$(opdir) diff --git a/scripts/etc-IPaddr2-vyatta b/scripts/etc-IPaddr2-vyatta index 134d00c..77d89d0 100755 --- a/scripts/etc-IPaddr2-vyatta +++ b/scripts/etc-IPaddr2-vyatta @@ -62,7 +62,7 @@ if [ ! -z "$str" ]; then esac fi -OCF_TYPE=IPaddr2 +OCF_TYPE=IPaddr2-vyatta OCF_RESKEY_lvs_support=1 OCF_RESOURCE_INSTANCE=${OCF_TYPE}_$BASEIP export OCF_TYPE OCF_RESOURCE_INSTANCE OCF_RESKEY_lvs_support diff --git a/scripts/ocf-IPaddr2-vyatta b/scripts/ocf-IPaddr2-vyatta index 0d1101c..082b84f 100755 --- a/scripts/ocf-IPaddr2-vyatta +++ b/scripts/ocf-IPaddr2-vyatta @@ -373,21 +373,7 @@ delete_interface () { if [ $? -ne 0 ]; then return $OCF_ERR_GENERIC fi - - CMD="$IP2UTIL -o -f inet addr show $iface" - - ocf_log info "$CMD" - ADDR=`$CMD` - - if [ $? -ne 0 -o ! -z "$ADDR" ]; then - return $? - fi - - CMD="$IP2UTIL link set $iface down" - - ocf_log info "$CMD" - $CMD - return $? + return 0 } # |