File bootcycle.spec of Package bootcycle
#
# spec file for package bootcycle
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: bootcycle
License: GPL-2.0+
Group: System/Boot
Version: 0.3
Release: 233
Summary: Boot Cycle Detection
PreReq: %fillup_prereq %insserv_prereq
%ifarch %ix86 x86_64
Requires: grub
%endif
%ifarch %ia64
Requires: efibootmgr
%endif
Source0: sysconfig.bootloader-bootcycle
Source1: boot.cycle.IA32
Source3: boot.cycle.IA64
Source2: README.IA32
Source4: README.IA64
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 ia64 x86_64
%description
This package provides a boot script that is used for boot cycle
detection to avoid unconditional reboot cycles on an unsupervised
system. For example, on INTEL IA32 the GNU GRUB multiboot loader is
used for this.
%prep
%setup -n %{name}-%{version} -c -T
%ifarch %ix86 x86_64
cp %{SOURCE1} boot.cycle
cp %{SOURCE2} README
%endif
%ifarch ia64
cp %{SOURCE3} boot.cycle
cp %{SOURCE4} README
%endif
%install
install -d -m 0755 $RPM_BUILD_ROOT/etc/init.d/boot.d
install -d -m 0755 $RPM_BUILD_ROOT/var/adm/fillup-templates
install -c -m 0755 boot.cycle $RPM_BUILD_ROOT/etc/init.d/
install -c -m 0644 %{SOURCE0} $RPM_BUILD_ROOT/var/adm/fillup-templates/
%post
%{fillup_only -an bootloader}
%{fillup_and_insserv -fY boot.cycle}
%postun
%{insserv_cleanup}
%files
%defattr(-,root,root)
%doc README
%config /etc/init.d/boot.cycle
/var/adm/fillup-templates/*
%changelog