From b6b0567fbd186f8ce8a0c90bdc7a7b5b4c649678 Mon Sep 17 00:00:00 2001 From: Ryan Leavengood Date: Thu, 20 Aug 2009 19:21:18 +0000 Subject: [PATCH] - Change Autostart directory name to launch. - Move the launching of files in this directory from the Bootscript to the UserBootscript. - This means we now ship a working UserBootscript instead of just a sample. - Updated documentation based on this change and Humdinger's suggestions. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32544 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- build/jam/HaikuImage | 6 +++--- data/config/boot/UserBootscript | 23 +++++++++++++++++++++++ data/config/boot/UserBootscript.sample | 15 --------------- data/system/boot/Bootscript | 8 -------- docs/userguide/en/bash-scripting.html | 2 +- 5 files changed, 27 insertions(+), 27 deletions(-) create mode 100644 data/config/boot/UserBootscript delete mode 100644 data/config/boot/UserBootscript.sample diff --git a/build/jam/HaikuImage b/build/jam/HaikuImage index afac21fdbe..0689315495 100644 --- a/build/jam/HaikuImage +++ b/build/jam/HaikuImage @@ -337,12 +337,12 @@ local bootScripts = Bootscript Bootscript.cd SetupEnvironment Netscript Installe SEARCH on $(bootScripts) = [ FDirName $(HAIKU_TOP) data system boot ] ; AddFilesToHaikuImage system boot : $(bootScripts) ; -local userBootScripts = UserBootscript.sample UserSetupEnvironment.sample ; +local userBootScripts = UserBootscript UserSetupEnvironment.sample ; SEARCH on $(userBootScripts) = [ FDirName $(HAIKU_TOP) data config boot ] ; AddFilesToHaikuImage home config boot : $(userBootScripts) ; -# Add Autostart directory -AddDirectoryToHaikuImage home config boot Autostart ; +# Add boot launch directory +AddDirectoryToHaikuImage home config boot launch ; local logoArtwork = "HAIKU logo - white on blue - big.png" "HAIKU logo - white on blue - normal.png" ; diff --git a/data/config/boot/UserBootscript b/data/config/boot/UserBootscript new file mode 100644 index 0000000000..39252ef066 --- /dev/null +++ b/data/config/boot/UserBootscript @@ -0,0 +1,23 @@ +#!/bin/sh + +# DO NOT EDIT! +#===================================================================== +# Start all programs in the boot launch folder +for program in $HOME/config/boot/launch/* +do + "$program" & +done +#===================================================================== + +# Add custom commands to execute at every startup here. + +# This file is a standard bash script. For more information regarding shell +# scripts, refer to any online documentation for "bash scripting" + +# During boot, the commands listed in this script will be executed. +# Typically, you will want to include a trailing '&' on each line. +# This will allow the script to execute that command and process the next line. + +# To launch certain applications at boot-up, put links to those applications in +# the above boot launch directory. + diff --git a/data/config/boot/UserBootscript.sample b/data/config/boot/UserBootscript.sample deleted file mode 100644 index 68450fb78e..0000000000 --- a/data/config/boot/UserBootscript.sample +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# Quick start file for UserBootscript. Copy or rename this file as -# "/boot/home/config/boot/UserBootscript". -# Add custom commands to execute at every startup. - -# This file is a standard bash script. For more information regarding shell -# scripts, refer to any online documentation for "bash scripting" - -# During boot, the commands listed in this script will be executed. -# Typically, you will want to include a trailing '&' on each line. -# This will allow the script to execute that command and process the next line. - -# Run LaunchBox -# /boot/system/apps/LaunchBox & diff --git a/data/system/boot/Bootscript b/data/system/boot/Bootscript index 6951171d25..5540020f2f 100644 --- a/data/system/boot/Bootscript +++ b/data/system/boot/Bootscript @@ -152,14 +152,6 @@ if [ "$SAFEMODE" != "yes" ]; then fi fi -# Start all programs in the Autostart folder -if [ "$SAFEMODE" != "yes" ]; then - for program in $HOME/config/boot/Autostart/* - do - "$program" & - done -fi - # Check for fresh install and run post install scripts. postInstallDir=/boot/common/boot/post_install freshInstallIndicator=/boot/common/settings/fresh_install diff --git a/docs/userguide/en/bash-scripting.html b/docs/userguide/en/bash-scripting.html index 48fb8c0e9a..8c3ca7a2b4 100644 --- a/docs/userguide/en/bash-scripting.html +++ b/docs/userguide/en/bash-scripting.html @@ -58,7 +58,7 @@ If they don't exist already, you'll have to create the needed files yourself. Ot /boot/system/apps/Workspaces &

Remember to end a command with an "&" to start it as a background process, or the script will halt until that command has finished (in this case: the launched app was closed again).

-

A simple alternative to the above for starting applications at boot up is to put links to them in the /boot/home/config/boot/Autostart directory. This can be done simply in Tracker by right-clicking on the application you wish to have started automatically, going to Create Link and then navigating to the above directory to create a link to that application in that directory.

+

A simple alternative to the above for launching applications at boot up is to put links to them in the /boot/home/config/boot/launch directory. This can be done simply by right-clicking on the application you wish to have started automatically, going to Create Link and then navigating to the above directory.

The UserShutdownScript

/boot/home/config/boot/UserShutdownScript will be executed as the first step in the shutdown process. If the script returns a non-zero exit status, the shutdown is aborted.