On Fri, 2010-03-26 at 21:46 +0100, Alan Pevec wrote:> move banner modification to kickstart %post
> ---
> ovirt-node.spec.in | 14 +-------------
> recipe/ovirt-node-image.ks | 9 +++++++++
> 2 files changed, 10 insertions(+), 13 deletions(-)
>
> diff --git a/ovirt-node.spec.in b/ovirt-node.spec.in
> index 032a5a9..eaf52cc 100644
> --- a/ovirt-node.spec.in
> +++ b/ovirt-node.spec.in
> @@ -154,25 +154,17 @@ python nodeadmin/setup.py install --root %{buildroot}
>
> echo "oVirt Node release %{version}-%{release}" >
%{buildroot}%{_sysconfdir}/ovirt-release
> mkdir -p %{buildroot}/%{_sysconfdir}/default
> -echo "# File where default partitioning info is kept" >
%{buildroot}/%{_sysconfdir}/default/ovirt
> +echo "# File where default configuration is kept" >
%{buildroot}/%{_sysconfdir}/default/ovirt
>
> # ovirt-logos
> # should be ifarch i386
> -mkdir -p %{buildroot}/boot/grub
> install -p -m 644 images/grub-splash.xpm.gz %{buildroot}%{app_root}
> # end i386 bits
> -mkdir -p %{buildroot}/usr/lib/anaconda-runtime
> install -p -m 644 images/syslinux-vesa-splash.jpg %{buildroot}%{app_root}
> # ovirt-logos
>
> # release files
> echo "%{product_family} release %{version}%{?beta: %{beta}}
(%{release})" > %{buildroot}/etc/ovirt-release
> -cp %{buildroot}/etc/ovirt-release %{buildroot}/etc/issue
> -echo "Kernel \r on an \m (\l)" >> %{buildroot}/etc/issue
> -cp %{buildroot}/etc/issue %{buildroot}/etc/issue.net
> -echo >> %{buildroot}/etc/issue
> -ln -s ovirt-release %{buildroot}/etc/redhat-release
> -ln -s ovirt-release %{buildroot}/etc/system-release
>
> # ovirt-config-boot post-install hooks
> %{__install} -d -m0755 %{buildroot}%{_sysconfdir}/ovirt-config-boot.d
> @@ -247,10 +239,6 @@ fi
> %defattr(-,root,root)
> %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/ovirt-release
> %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/default/ovirt
> -%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/redhat-release
> -%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/system-release
> -%config(noreplace) %attr(0644,root,root) /etc/issue
> -%config(noreplace) %attr(0644,root,root) /etc/issue.net
>
> %config(noreplace) %{_sysconfdir}/logrotate.d/ovirt-node
> %config(noreplace) %{_sysconfdir}/cron.d/ovirt-logrotate
> diff --git a/recipe/ovirt-node-image.ks b/recipe/ovirt-node-image.ks
> index 270eb77..7c9361c 100644
> --- a/recipe/ovirt-node-image.ks
> +++ b/recipe/ovirt-node-image.ks
> @@ -84,6 +84,15 @@ linux0==1 && $1=="label" &&
$2!="linux0" {
> mv $LIVE_ROOT/isolinux/isolinux.cfg.standalone
$LIVE_ROOT/isolinux/isolinux.cfg
>
> cp $INSTALL_ROOT/usr/share/ovirt-node/syslinux-vesa-splash.jpg
$LIVE_ROOT/isolinux/splash.jpg
> +
> +# overwrite user visible banners with the image versioning info
> +PACKAGE=ovirt
> +ln -snf $PACKAGE-release $INSTALL_ROOT/etc/redhat-release
> +ln -snf $PACKAGE-release $INSTALL_ROOT/etc/system-release
> +cp $INSTALL_ROOT/etc/$PACKAGE-release $INSTALL_ROOT/etc/issue
> +echo "Kernel \r on an \m (\l)" >> $INSTALL_ROOT/etc/issue
> +cp $INSTALL_ROOT/etc/issue $INSTALL_ROOT/etc/issue.net
> +
> %end
>
> %post
ACK