A new user interface for you! Read more...

File rclxc.spec of Package rclxc

#
# spec file for package rclxc
# brian@aljex.com
#

Name:		rclxc
Version:	1.0.1
Release:	1
Url:		http://download.opensuse.org/
Summary:	Sysv init script for LXC containers
Group:		System/Management
License:	GPL
Source1:	lxc.init
Source2:	lxc.cgroup_release_agent
BuildRoot:	%{_tmppath}/%{name}-%{version}-build
Requires:	screen lxc >= 0.7.5
AutoReqProv:	on
PreReq:		%insserv_prereq
BuildArch: noarch
%if %undefined _initddir
%define _initddir %_initrddir
%endif

%description
This package contains a sysv init script to gracefully start and stop
LXC container systems. It also provides a minimal ability to query the
status of, and and to start/stop individual containers as well as all
configured containers at once.

The main purpose is so that the physical host can auto-start all containers
when the host is starting up, and so that the physical host can say, receive
a power-loss signal from a UPS and gracefully shut down all containers before
gracefully shutting itself down before power loss.

rclxc start|stop|restart - start/stop/restart all configured containers
rclxc status - show if any (one or more) container is currently running or none
rclxc <list|info> - show up/down status of all configured containers individally
rclxc <start|stop|restart|info> <container-name> - perform operation on a single container

%prep

%build

%install
%__install -Dm 755 %{S:1} %{buildroot}%{_initddir}/lxc
%__install -Dm 755 %{S:2} %{buildroot}%{_sbindir}/lxc_cgroup_release_agent
%__ln_s -f %{_initddir}/lxc %{buildroot}%{_sbindir}/%name

%post
%fillup_and_insserv -f lxc

%postun
%insserv_cleanup

%clean
%__rm -rf %buildroot

%files
%defattr(-,root,root)
%{_initddir}/lxc
%{_sbindir}/%name
%{_sbindir}/lxc_cgroup_release_agent

%changelog