File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ Net SNMP subagent executes arbitrary commands and provide results via snmpd
3333
3434%files
3535%defattr(-,root,root)
36- %_bindir /*
36+ %attr(755,root,root) % _bindir /*
3737%dir /etc/snmp/subagent-shell
3838%dir /etc/snmp/subagent-shell/mibs
3939%dir /etc/snmp/subagent-shell/conf.d
@@ -61,6 +61,24 @@ if [ $1 = 0 ] ; then
6161fi
6262exit 0
6363
64+ # this section is required to smooth upgrade from net-snmp-subagent package
65+ %triggerpostun -- net-snmp-subagent
66+ if [ "$1" == "1" ]; then
67+ if [ -d /etc/snmp/subagent ]; then
68+ for f in `find /etc/snmp/subagent/ -maxdepth 1 -type f -name '*.rpmsave'`
69+ do
70+ mv $f /etc/snmp/subagent-shell/`basename $f`
71+ done
72+ pushd /etc/snmp/subagent > /dev/null 2> &1
73+ find -maxdepth 1 -type f -exec cp '{}' /etc/snmp/subagent-shell ';'
74+ popd > /dev/null 2> &1
75+ rm -rf /etc/snmp/subagent
76+ echo 'Files from /etc/snmp/subagent moved to new /etc/snmp/subagent-shell directory ...'
77+ fi
78+ /sbin/chkconfig --add subagent-shell || :
79+ /sbin/service subagent-shell start > /dev/null 2> &1 || :
80+ fi
81+
6482%changelog
6583* Wed Nov 23 2011 Serge <abrikus@gmail.com> 1.1.0.0-ssv1
6684-- Initial release
Original file line number Diff line number Diff line change 1- AC_INIT ( net-snmp-subagent-shell , 2.1.2.0 , abrikus@gmail.com )
2- AM_INIT_AUTOMAKE ( net-snmp-subagent-shell , 2.1.2.0 )
1+ AC_INIT ( net-snmp-subagent-shell , 2.1.2.1 , abrikus@gmail.com )
2+ AM_INIT_AUTOMAKE
33AC_PROG_INSTALL
44AC_OUTPUT (Makefile)
5+ AC_OUTPUT (subagent-shell)
Original file line number Diff line number Diff line change @@ -75,6 +75,8 @@ undef $opt->{log_file} unless $opt->{log_file};
7575
7676sub help {
7777 print <<EOHELP ;
78+ Version: @VERSION @
79+
7880Usage: subagent-shell [options]
7981
8082Options:
You can’t perform that action at this time.
0 commit comments