Skip to content

Commit

Permalink
Added post-install script, and start UserBootscript again.
Browse files Browse the repository at this point in the history
* This is the final missing piece of the former boot process.
* Removed the unused Bootscript, and Bootscript.cd files.
  • Loading branch information
axeld committed Jul 22, 2015
1 parent 58fd8ac commit 65ed8a5
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 283 deletions.
2 changes: 1 addition & 1 deletion build/jam/packages/HaikuBootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ AddSymlinkToPackage bin : trash : untrash ;
AddSymlinkToPackage bin : less : more ;

# scripts and data files
local bootScripts = Bootscript Bootscript.cd SetupEnvironment
local bootScripts = PostInstallScript SetupEnvironment
InstallerInitScript InstallerFinishScript ;
SEARCH on $(bootScripts) = [ FDirName $(HAIKU_TOP) data system boot ] ;
AddFilesToPackage boot : $(bootScripts) ;
Expand Down
5 changes: 5 additions & 0 deletions data/launch/system
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ service x-vnd.Haiku-power_daemon {
legacy
}

job post-install {
launch /bin/sh /system/boot/PostInstallScript
if file_exists /boot/system/settings/fresh_install
}

target login {
job x-vnd.Haiku-autologin {
launch /system/bin/autologin
Expand Down
4 changes: 4 additions & 0 deletions data/launch/user
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ target desktop {
}
}

job user-bootscript {
launch /bin/sh /boot/home/config/settings/boot/UserBootscript
}

job create-installer-link {
# When run from a read-only medium a.k.a. live desktop
if {
Expand Down
212 changes: 0 additions & 212 deletions data/system/boot/Bootscript

This file was deleted.

70 changes: 0 additions & 70 deletions data/system/boot/Bootscript.cd

This file was deleted.

22 changes: 22 additions & 0 deletions data/system/boot/PostInstallScript
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh

# Check for fresh install and run post install scripts.

freshInstallIndicator=/boot/system/settings/fresh_install
postInstallDir=boot/post-install
if [ -e $freshInstallIndicator ]; then
# wait a moment for things to calm down a bit
sleep 3

# execute scripts
for f in /boot/system/$postInstallDir/*.sh
do
if [ -f $f ]; then
echo "Running post install script $f ..." > /dev/dprintf
$f
fi
done

sync
rm $freshInstallIndicator
fi

0 comments on commit 65ed8a5

Please sign in to comment.