diff options
author | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-07-03 16:04:58 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-07-03 16:04:58 -0700 |
commit | d0665e19efd69eee31344f1a1af212639dda0943 (patch) | |
tree | d1ffec27799d7b7309a9f94074dae30ee9d88ad4 /packages | |
parent | 21117bb5c26abcb42a7dcc5f318190e734c849bd (diff) | |
download | vyos-cloud-init-d0665e19efd69eee31344f1a1af212639dda0943.tar.gz vyos-cloud-init-d0665e19efd69eee31344f1a1af212639dda0943.zip |
Add the ability to have setup.py have a CLI option that specifies the daemon type
which then later affects the installation of certain config files, which then
can be extracted during package creation as needed.
Diffstat (limited to 'packages')
-rwxr-xr-x | packages/brpm | 1 | ||||
-rw-r--r-- | packages/redhat/cloud-init.spec | 38 |
2 files changed, 10 insertions, 29 deletions
diff --git a/packages/brpm b/packages/brpm index 3abd9f15..1212b0e4 100755 --- a/packages/brpm +++ b/packages/brpm @@ -150,6 +150,7 @@ def generate_spec_contents(args, tmpl_fn): else: subs['systemd'] = False + subs['daemon_type'] = args.boot return templater.render_from_file(tmpl_fn, params=subs) diff --git a/packages/redhat/cloud-init.spec b/packages/redhat/cloud-init.spec index e9ce087a..df13bcb7 100644 --- a/packages/redhat/cloud-init.spec +++ b/packages/redhat/cloud-init.spec @@ -1,6 +1,6 @@ %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -# See: See: http://www.zarb.org/~jasonc/macros.php +# See: http://www.zarb.org/~jasonc/macros.php # Or: http://fedoraproject.org/wiki/Packaging:ScriptletSnippets # Or: http://www.rpm.org/max-rpm/ch-rpm-inside.html @@ -61,7 +61,9 @@ ssh keys and to let the user run various scripts. %install rm -rf $RPM_BUILD_ROOT -%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +%{__python} setup.py install -O1 \ + --skip-build --root $RPM_BUILD_ROOT \ + --daemon-type={{daemon_type}} # Note that /etc/rsyslog.d didn't exist by default until F15. # el6 request: https://bugzilla.redhat.com/show_bug.cgi?id=740420 @@ -69,24 +71,6 @@ mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/rsyslog.d cp -p tools/21-cloudinit.conf \ $RPM_BUILD_ROOT/%{_sysconfdir}/rsyslog.d/21-cloudinit.conf -{{if init_d}} -mkdir -p $RPM_BUILD_ROOT/%{_initddir}/ -{{endif}} -{{if init_d_local}} -cp -p initd/cloud-init-local $RPM_BUILD_ROOT/%{_initddir}/ -cp -p initd/cloud-config $RPM_BUILD_ROOT/%{_initddir}/ -cp -p initd/cloud-final $RPM_BUILD_ROOT/%{_initddir}/ -{{elif init_d}} -cp -p initd/cloud-init $RPM_BUILD_ROOT/%{_initddir}/ -cp -p initd/cloud-config $RPM_BUILD_ROOT/%{_initddir}/ -cp -p initd/cloud-final $RPM_BUILD_ROOT/%{_initddir}/ -{{endif}} - -{{if systemd}} -mkdir -p $RPM_BUILD_ROOT/%{_unitdir} -cp -p systemd/* $RPM_BUILD_ROOT/%{_unitdir} -{{endif}} - %clean rm -rf $RPM_BUILD_ROOT @@ -103,13 +87,13 @@ fi {{endif}} {{if init_d_local}} -/sbin/chkconfig --add /etc/rc.d/init.d/cloud-init-local +/sbin/chkconfig --add %{_initrddir}/cloud-init-local {{elif init_d}} -/sbin/chkconfig --add /etc/rc.d/init.d/cloud-init +/sbin/chkconfig --add %{_initrddir}/cloud-init {{endif}} {{if init_d}} -/sbin/chkconfig --add /etc/rc.d/init.d/cloud-config -/sbin/chkconfig --add /etc/rc.d/init.d/cloud-final +/sbin/chkconfig --add %{_initrddir}/cloud-config +/sbin/chkconfig --add %{_initrddir}/cloud-final {{endif}} %preun @@ -166,11 +150,7 @@ fi {{endif}} {{if systemd}} -%{_unitdir}/cloud-config.service -%{_unitdir}/cloud-config.target -%{_unitdir}/cloud-init.service -%{_unitdir}/cloud-init-local.service -%{_unitdir}/cloud-final.service +%{_unitdir}/cloud-* {{endif}} # Program binaries |