PDA

View Full Version : run installer file right after boot, only once



satanowicz
11-Sep-2012, 11:06
Hi.

I have an interactive installer in a .run file.
It's supposed to be installed after the system is installed (autoyast).
I would like to run it right after the boot process ends and after KDE starts (the installer needs gui).
The .run file should be executed only once.

BTW The autologin function is on.

Can anybody suggest me how to do it?
I thought about mixing with the .profile i.e.:


./file.run &
sed --in-place '/run/d' .profile
sed --in-place '/in-place/d' .profile

But it doesn't work right and it's not a 'clean' method.

malcolmlewis
11-Sep-2012, 14:09
Hi.

I have an interactive installer in a .run file.
It's supposed to be installed after the system is installed (autoyast).
I would like to run it right after the boot process ends and after KDE
starts (the installer needs gui).
The .run file should be executed only once.

BTW The autologin function is on.

Can anybody suggest me how to do it?
I thought about mixing with the .profile i.e.:

Code:
--------------------

./file.run &
sed --in-place '/run/d' .profile
sed --in-place '/in-place/d' .profile

--------------------

But it doesn't work right and it's not a 'clean' method.



Hi
Create a wrapper script and place in the user home 'autostart'
directory that checks in the file (or a directory) from the installer
exists. If it doesn't run the file, if it does skip...


#!/bin/bash
if [ ! -f ~/.installed ]; then
echo "Running installer"
touch ~/.installed
else
echo "Installed, not running"
fi


--
Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.6-2.10-desktop
up 16:57, 3 users, load average: 0.01, 0.03, 0.05
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU