diff --git a/templates.spec b/templates.spec index 0e1f8a2..457c394 100644 --- a/templates.spec +++ b/templates.spec @@ -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 >\ $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 cp vm_kernels_appvm/vmlinuz $RPM_BUILD_ROOT/%{dest_dir}/kernels/vmlinuz 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}/templatevm.conf %{dest_dir}/%{template_name}.conf +%{dest_dir}/dispvm-prerun.sh %dir %{dest_dir}/kernels %{dest_dir}/kernels/vmlinuz %{dest_dir}/kernels/initramfs diff --git a/vm_conf_files/dispvm-prerun.sh b/vm_conf_files/dispvm-prerun.sh new file mode 100755 index 0000000..a381719 --- /dev/null +++ b/vm_conf_files/dispvm-prerun.sh @@ -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. +