5 %define url $URL: svn+ssh://svn.planet-lab.org/svn/PLCRT/trunk/plcrt.spec $
11 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
17 Group: Applications/System
18 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
21 Packager: PlanetLab Central <support@planet-lab.org>
22 Distribution: PlanetLab %{plrelease}
23 URL: %(echo %{url} | cut -d ' ' -f 2)
25 Summary: PLCRT account initialization for the root image.
26 Group: Applications/System
29 PLCRT is a collection of configuration scripts for configuring RT.
30 By default RT does not come with all the settings needed for a standard PLC,
31 or PlanetLab in particular.
34 Summary: PLCRT Setup scripts for RT3
35 Group: Applications/System
48 install -d $RPM_BUILD_ROOT/%{_datadir}/%{name}
49 install -D -m 755 plcrt.init $RPM_BUILD_ROOT/%{_sysconfdir}/plc.d/plcrt
51 echo " * Installing core scripts"
52 rsync -a ./ $RPM_BUILD_ROOT/%{_datadir}/%{name}/
54 echo " * Installing cron scripts"
55 install -D -m 644 rt.cron $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/rt.cron
57 chmod 755 $RPM_BUILD_ROOT/%{_datadir}/%{name}/adduserstort.pl
58 chmod 755 $RPM_BUILD_ROOT/%{_datadir}/%{name}/rtcron.d/*.sh
61 rm -rf $RPM_BUILD_ROOT
65 %config /etc/rt3/RT_SiteConfig.pm
66 #%config /etc/plcrt.conf
68 %{_sysconfdir}/plc.d/plcrt
69 %{_sysconfdir}/cron.d/rt.cron
72 if grep 'pam_loginuid.so' /etc/pam.d/crond ; then
73 sed -i -e 's/^session required pam_loginuid.so/#session required pam_loginuid.so/g' /etc/pam.d/crond
76 if ! grep '<category id="plc_rt">' /etc/planetlab/default_config.xml ; then
77 sed -i 's|<category id="plc_net">| <category id="plc_rt">\n <name>RT Configuration</name>\n <description>RT</description>\n <variablelist>\n <variable id="enabled" type="boolean">\n <name>Enabled</name>\n <value>false</value>\n <description>Enable on this machine.</description>\n </variable>\n <variable id="host" type="hostname">\n <name>Hostname</name>\n <value>localhost.localdomain</value>\n <description>The fully qualified hostname.</description>\n </variable>\n <variable id="ip" type="ip">\n <name>IP Address</name>\n <value/>\n <description>The IP address of the RT server.</description>\n </variable>\n </variablelist>\n </category>\n <category id="plc_net">|' /etc/planetlab/default_config.xml
80 plc-config --save /etc/planetlab/default_config.xml \
81 --category plc_rt --variable enabled --value true
84 * Thu Jun 26 2009 Stephen Soltesz <soltesz@cs.princeton.edu> - PLCRT-1.0-1