From 65ed8a5e87f10405105fa017a0879161e84620b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 17 Jul 2015 22:15:38 +0200 Subject: [PATCH] Added post-install script, and start UserBootscript again. * This is the final missing piece of the former boot process. * Removed the unused Bootscript, and Bootscript.cd files. --- build/jam/packages/HaikuBootstrap | 2 +- data/launch/system | 5 + data/launch/user | 4 + data/system/boot/Bootscript | 212 ----------------------------- data/system/boot/Bootscript.cd | 70 ---------- data/system/boot/PostInstallScript | 22 +++ 6 files changed, 32 insertions(+), 283 deletions(-) delete mode 100644 data/system/boot/Bootscript delete mode 100644 data/system/boot/Bootscript.cd create mode 100644 data/system/boot/PostInstallScript diff --git a/build/jam/packages/HaikuBootstrap b/build/jam/packages/HaikuBootstrap index f6aee2aa0e..cee5261f0a 100644 --- a/build/jam/packages/HaikuBootstrap +++ b/build/jam/packages/HaikuBootstrap @@ -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) ; diff --git a/data/launch/system b/data/launch/system index 1b737fdd95..ba726cfe4f 100644 --- a/data/launch/system +++ b/data/launch/system @@ -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 diff --git a/data/launch/user b/data/launch/user index 7792beb659..be034a92ba 100644 --- a/data/launch/user +++ b/data/launch/user @@ -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 { diff --git a/data/system/boot/Bootscript b/data/system/boot/Bootscript deleted file mode 100644 index a6af7f0b82..0000000000 --- a/data/system/boot/Bootscript +++ /dev/null @@ -1,212 +0,0 @@ -## The system's main boot script. - -## -## Some functions used by the main script -## - -# launch [ [ ] ] - -launch() { - toLaunch="$1" - shift - toWaitFor="$1" - (( $# )) && shift - if [ -f "/boot/$toLaunch" ] - then - "/boot/$toLaunch" $* & - [ "$toWaitFor" != "" ] && waitfor "$toWaitFor" - return 1 - else - echo There is no "$toLaunch" - fi - return 0 -} - -# launchscript