3 %define release 6.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 RUNLEVEL=`/sbin/runlevel`
51 if [ "$1" -ge 1 ]; then
53 chkconfig --add pl_mom
54 chkconfig --level 3 pl_mom on
56 if [[ "$RUNLEVEL" != "unknown" ]]; then
57 /etc/init.d/pl_mom stop
58 /etc/init.d/pl_mom start
63 RUNLEVEL=`/sbin/runlevel`
65 if [ "$1" -eq 0 ]; then
66 if [[ "$RUNLEVEL" != "unknown" ]]; then
67 /etc/init.d/pl_mom stop