From 49473fc52e4d233bce995cb293f7f59d9367bce3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 26 Aug 2009 08:58:26 +0000 Subject: [PATCH] * Added links to the Installer on the Desktop, and the Deskbar's Applications list when booting from CD. Both are removed from the target in the InstallerFinishScript. This closes ticket #4342. * Make Installer start in safemode as well. * Are there any objections to always have the Installer link in the Deskbar? I see no real reason to leave it out. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32686 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- data/system/boot/Bootscript | 4 ++++ data/system/boot/Bootscript.cd | 18 ++++++------------ data/system/boot/InstallerFinishScript | 17 ++++++++++------- 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/data/system/boot/Bootscript b/data/system/boot/Bootscript index 5540020f2f..c4c923be3d 100644 --- a/data/system/boot/Bootscript +++ b/data/system/boot/Bootscript @@ -102,6 +102,10 @@ fi # Now ask the user if he wants to run the Installer or continue to the Desktop. if [ "$isReadOnly" = "yes" ]; then + # Create Installer links (using the write overlay) + ln -sf /boot/system/apps/Installer /boot/home/Desktop/Installer + ln -sf /boot/system/apps/Installer /boot/home/config/be/Applications/Installer + /bin/alert "Do you wish to run the Installer or continue booting to the Desktop?" "Installer" "Desktop" if [ $? -eq 0 ]; then launchscript $SCRIPTS/Bootscript.cd diff --git a/data/system/boot/Bootscript.cd b/data/system/boot/Bootscript.cd index dee9e925bc..8eebd37806 100644 --- a/data/system/boot/Bootscript.cd +++ b/data/system/boot/Bootscript.cd @@ -45,19 +45,13 @@ runprog() { ## -# Launch Terminal or consoled depending on $SAFEMODE -if [ "$SAFEMODE" != "yes" ]; then - cd /boot/home - if [ -x /boot/system/apps/Installer ]; then - /boot/system/apps/Installer - #/boot/system/apps/Terminal -x /boot/system/apps/Installer - else - /boot/system/apps/Terminal - fi - #launch system/apps/Terminal +# Launch Installer + +cd /boot/home +if [ -x /boot/system/apps/Installer ]; then + /boot/system/apps/Installer else - launch system/bin/consoled - exit 0 # return so we don't eject and reboot + /boot/system/apps/Terminal fi # sync disks diff --git a/data/system/boot/InstallerFinishScript b/data/system/boot/InstallerFinishScript index 6e52cc7844..a105f98864 100644 --- a/data/system/boot/InstallerFinishScript +++ b/data/system/boot/InstallerFinishScript @@ -1,19 +1,22 @@ #!/bin/sh ## The installer finish script. -mount=$1 +target=$1 -if [ -z "$mount" ]; then - echo "Usage: $0 volume" +if [ -z "$target" ]; then + echo "Usage: $0 " exit 1 fi -if [ ! -d "$mount" ]; then - echo "$mount isn't mounted" +if [ ! -d "$target" ]; then + echo "$target isn't mounted" exit 1 fi -mkdir -p "$mount/var/tmp" +mkdir -p "$target/var/tmp" -makebootable "$mount" +# remove Installer links +rm -f $target/home/Desktop/Installer +rm -f $target/home/config/be/Applications/Installer +makebootable "$target"