����� ������������ OpenNet.ru / ������ "������������ ��� Linux" / ������

22.3.5 ������� ������ ��������� � ��������

������ ����� ��������� �������, ���������� �������, ������� ������ ���� ��������� ����� ���������/�������� ������ ��� �� ��� ���������/��������. ��� ������� ������ ������� ����������� ������:

- ��� �������� ����� ����������: %pre;
- ��� �������� ����� ���������: %post;
- ��� �������� ����� ���������: %preun;
- ��� �������� ����� ��������: %postun.

��������:

%post

/sbin/chkconfig --add ypbind

%preun

if [ "$1" = 0 ] ; then

/sbin/service ypbind stop > /dev/null 2>&1

/sbin/chkconfig --del ypbind

fi

exit 0

%postun

if [ "$1" -ge 1 ]; then

/sbin/service ypbind condrestart > /dev/null 2>&1

fi

exit 0

����� - �����
����� - �������
����������


����� ������������ �� OpenNet.ru