forked from sflow/host-sflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hsflowd.spec.aix
76 lines (64 loc) · 1.98 KB
/
hsflowd.spec.aix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Summary: host sFlow daemon
Name: hsflowd
Version: 1.28.3
Release: 1
License: http://sflow.net/license.html
Group: Applications/Internet
URL: http://sflow.net
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
%define OpenVSwitchControl /usr/bin/ovs-vsctl
%description
This program implements the host sFlow(R) standard - sending
key performance metrics to an sFlow collector to enable
highly-scalable monitoring of all critical resources in
the network. If Open VSwitch is present, will also control
the Open VSwitch sFlow configuration.
%prep
%setup
%build
gmake
%install
rm -rf %{buildroot}
gmake INSTROOT=%{buildroot} install
%clean
rm -rf %{buildroot}
gmake clean
%files
%defattr(-,root,root,-)
/usr/sbin/hsflowd
/usr/sbin/sflowovsd
%config(noreplace) /etc/hsflowd.conf
/etc/rc.d/init.d/hsflowd
/etc/rc.d/init.d/sflowovsd
%doc README LICENSE INSTALL.AIX
%post
# schedule daemon(s)
#/sbin/chkconfig --add hsflowd
#if [ -x %{OpenVSwitchControl} ]; then /sbin/chkconfig --add sflowovsd; fi
# need this logic just for Xenserver package. It preserves config
# across Xenserver upgrades by copying the config to another directory
# so that we get a chance to merge the old and new configs.
if [ -n "$XS_PREVIOUS_INSTALLATION" ]; then
# upgrade in progress
if [ -r $XS_PREVIOUS_INSTALLATION/etc/hsflowd.conf ]; then
mv -f /etc/hsflowd.conf /etc/hsflowd.conf.rpmnew
cp -fp $XS_PREVIOUS_INSTALLATION/etc/hsflowd.conf /etc
fi
fi
if [ -r /etc/hsflowd.conf -a -r /etc/hsflowd.conf.rpmnew ]; then
# merge new material from hsflowd.conf.rpmnew with hsflowd.conf
# which may contain changes. (Nothing to do at the moment.)
# And remove the rpmnew file.
rm -f /etc/hsflowd.conf.rpmnew
fi
%preun
if [ $1 = 0 ]; then
# /sbin/service hsflowd stop > /dev/null 2>&1
# /sbin/service sflowovsd stop > /dev/null 2>&1
# /sbin/chkconfig --del hsflowd
# /sbin/chkconfig --del sflowovsd
fi
%changelog
* Fri Aug 30 2013 nhm <[email protected]>
- initial version for AIX