3 %define release 9.planetlab%{?date:.%{date}}
5 Summary: PlanetLab mom -- Cleans up your mess
10 Group: System Environment/Kernel
11 Source: %{name}-%{version}.tgz
13 Packager: PlanetLab Central <support@planet-lab.org>
14 Distribution: PlanetLab 3.0
15 URL: http://cvs.planet-lab.org/cvs/pl_mom
16 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
20 A small daemon that watches the consumed swap space. At 90% utilization, it
21 resets the slice that is the biggest memory hog. At 95% utilization, it
31 mkdir -p $RPM_BUILD_ROOT/usr/local/planetlab/bin/
32 mkdir -p $RPM_BUILD_ROOT/etc/init.d/
34 cp pl_mom $RPM_BUILD_ROOT/etc/init.d/
35 cp pl_mom.pl $RPM_BUILD_ROOT/usr/local/planetlab/bin/
38 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
41 %defattr(0755, root, root)
43 /usr/local/planetlab/bin/pl_mom.pl
49 if [ "$1" -ge 1 ]; then
51 chkconfig --add pl_mom
52 chkconfig --level 3 pl_mom on
54 if [[ "$PL_BOOTCD" != "1" ]]; then
55 /etc/init.d/pl_mom stop
56 /etc/init.d/pl_mom start
61 if [ "$1" -eq 0 ]; then
62 if [[ "$PL_BOOTCD" != "1" ]]; then
63 /etc/init.d/pl_mom stop
66 chkconfig --del pl_mom