Add dispvm-prerun.sh script to template rpm
This script should be part of the Template VM RPM, rather than core RPM, because it is TemplateVM-specific, i.e. depends on the actual software installed in the VM, and also is closely related to the dispvm-dotfiles.tbz that is also part of template RPM now.
This commit is contained in:
parent
c57666a6a5
commit
2ca048244d
@ -43,6 +43,8 @@ cp vm_conf_files/templatevm.conf $RPM_BUILD_ROOT/%{dest_dir}/templatevm.conf
|
|||||||
sed -e s/%TEMPLATENAME%/%{template_name}/ < vm_conf_files/templatevm.conf >\
|
sed -e s/%TEMPLATENAME%/%{template_name}/ < vm_conf_files/templatevm.conf >\
|
||||||
$RPM_BUILD_ROOT/%{dest_dir}/%{template_name}.conf
|
$RPM_BUILD_ROOT/%{dest_dir}/%{template_name}.conf
|
||||||
|
|
||||||
|
cp vm_conf_files/dispvm-prerun.sh $RPM_BUILD_ROOT/%{dest_dir}/
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{dest_dir}/kernels
|
mkdir -p $RPM_BUILD_ROOT/%{dest_dir}/kernels
|
||||||
cp vm_kernels_appvm/vmlinuz $RPM_BUILD_ROOT/%{dest_dir}/kernels/vmlinuz
|
cp vm_kernels_appvm/vmlinuz $RPM_BUILD_ROOT/%{dest_dir}/kernels/vmlinuz
|
||||||
cp vm_kernels_appvm/initramfs $RPM_BUILD_ROOT/%{dest_dir}/kernels/initramfs
|
cp vm_kernels_appvm/initramfs $RPM_BUILD_ROOT/%{dest_dir}/kernels/initramfs
|
||||||
@ -115,6 +117,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{dest_dir}/appvm-template.conf
|
%{dest_dir}/appvm-template.conf
|
||||||
%{dest_dir}/templatevm.conf
|
%{dest_dir}/templatevm.conf
|
||||||
%{dest_dir}/%{template_name}.conf
|
%{dest_dir}/%{template_name}.conf
|
||||||
|
%{dest_dir}/dispvm-prerun.sh
|
||||||
%dir %{dest_dir}/kernels
|
%dir %{dest_dir}/kernels
|
||||||
%{dest_dir}/kernels/vmlinuz
|
%{dest_dir}/kernels/vmlinuz
|
||||||
%{dest_dir}/kernels/initramfs
|
%{dest_dir}/kernels/initramfs
|
||||||
|
18
vm_conf_files/dispvm-prerun.sh
Executable file
18
vm_conf_files/dispvm-prerun.sh
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
apps="evince okular openoffice gwenview firefox"
|
||||||
|
|
||||||
|
for app in $apps ; do
|
||||||
|
echo "Launching: $app..."
|
||||||
|
$app >/tmp/dispvm_prerun_errors.log 2>&1 &
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Sleeping..."
|
||||||
|
sleep 120
|
||||||
|
|
||||||
|
ps ax > /tmp/dispvm-prerun-proclist.log
|
||||||
|
|
||||||
|
cat /etc/dispvm-dotfiles.tbz | tar -xjf- --overwrite -C /home/user --owner user 2>&1 >/tmp/dispvm-dotfiles-errors.log
|
||||||
|
|
||||||
|
echo done.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user