Changeset 25309

Show
Ignore:
Timestamp:
05/04/08 08:10:42 (2 weeks ago)
Author:
bonefish
Message:
Reactivated the "fresh install" code in the Bootscript, but modified it
a bit:
* Added directory /etc/post_install, which can contain scripts that will
  be executed on the first boot.
* Moved the mimeset invocations to such a script. Use the "-apps"
  option instead of "-all". Since create_app_meta_mime() (and thus
  mimeset) work recursively now, running the commands does actually have
  an effect.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • haiku/trunk/build/jam/HaikuImage

    r25190 r25309  
    338338AddFilesToHaikuImage common settings network : $(networkSettingsFiles) ; 
    339339 
    340 # fresh install indicator file 
    341 SEARCH on <settings>fresh_install = [ FDirName $(HAIKU_TOP) data settings ] ; 
    342 AddFilesToHaikuImage home config settings : <settings>fresh_install ; 
     340# post install scripts and fresh install indicator file 
     341local postInstallFiles = fresh_install mime_update.sh ; 
     342postInstallFiles = $(postInstallFiles:G=post-install) ; 
     343SEARCH on $(postInstallFiles) 
     344        = [ FDirName $(HAIKU_TOP) data etc post_install ] ; 
     345AddFilesToHaikuImage beos etc post_install : $(postInstallFiles) ; 
    343346 
    344347# boot loader 
  • haiku/trunk/data/system/boot/Bootscript

    r25164 r25309  
    139139fi 
    140140 
    141 # Check for fresh install and register all bundled app mimetypes 
    142 FRESH_INSTALL_INDICATOR_FILE=$HOME/config/settings/fresh_install 
    143 if [ -e $FRESH_INSTALL_INDICATOR_FILE ]; then 
    144 #       mimeset -all -f /boot/beos/apps 
    145 #       mimeset -all -f /boot/beos/preferences 
    146 #       mimeset -all -f /boot/beos/system/servers 
    147 #       mimeset -all -f /boot/apps 
    148         rm $FRESH_INSTALL_INDICATOR_FILE 
     141# Check for fresh install and run post install scripts. 
     142postInstallDir=/boot/beos/etc/post_install 
     143freshInstallIndicator=$postInstallDir/fresh_install 
     144if [ -e $freshInstallIndicator ]; then 
     145        # wait a moment for things to calm down a bit 
     146        sleep 3 
     147 
     148        # execute scripts 
     149        for f in $postInstallDir/*.sh; do 
     150                if [ -f $f ]; then 
     151                        echo "Running post install script $f ..." > /dev/dprintf 
     152                        $f 
     153                fi 
     154        done 
     155 
     156        sync 
     157        rm $freshInstallIndicator 
    149158fi