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. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25309 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -337,9 +337,12 @@ SEARCH on $(networkSettingsFiles)
|
|||||||
= [ FDirName $(HAIKU_TOP) data settings network ] ;
|
= [ FDirName $(HAIKU_TOP) data settings network ] ;
|
||||||
AddFilesToHaikuImage common settings network : $(networkSettingsFiles) ;
|
AddFilesToHaikuImage common settings network : $(networkSettingsFiles) ;
|
||||||
|
|
||||||
# fresh install indicator file
|
# post install scripts and fresh install indicator file
|
||||||
SEARCH on <settings>fresh_install = [ FDirName $(HAIKU_TOP) data settings ] ;
|
local postInstallFiles = fresh_install mime_update.sh ;
|
||||||
AddFilesToHaikuImage home config settings : <settings>fresh_install ;
|
postInstallFiles = $(postInstallFiles:G=post-install) ;
|
||||||
|
SEARCH on $(postInstallFiles)
|
||||||
|
= [ FDirName $(HAIKU_TOP) data etc post_install ] ;
|
||||||
|
AddFilesToHaikuImage beos etc post_install : $(postInstallFiles) ;
|
||||||
|
|
||||||
# boot loader
|
# boot loader
|
||||||
AddFilesToHaikuImage beos system : zbeos ;
|
AddFilesToHaikuImage beos system : zbeos ;
|
||||||
|
|||||||
Executable
+8
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Make sure all apps have a MIME DB entry.
|
||||||
|
|
||||||
|
mimeset -apps -f /boot/beos/apps
|
||||||
|
mimeset -apps -f /boot/beos/preferences
|
||||||
|
mimeset -apps -f /boot/beos/system/servers
|
||||||
|
mimeset -apps -f /boot/apps
|
||||||
@@ -138,12 +138,21 @@ if [ "$SAFEMODE" != "yes" ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check for fresh install and register all bundled app mimetypes
|
# Check for fresh install and run post install scripts.
|
||||||
FRESH_INSTALL_INDICATOR_FILE=$HOME/config/settings/fresh_install
|
postInstallDir=/boot/beos/etc/post_install
|
||||||
if [ -e $FRESH_INSTALL_INDICATOR_FILE ]; then
|
freshInstallIndicator=$postInstallDir/fresh_install
|
||||||
# mimeset -all -f /boot/beos/apps
|
if [ -e $freshInstallIndicator ]; then
|
||||||
# mimeset -all -f /boot/beos/preferences
|
# wait a moment for things to calm down a bit
|
||||||
# mimeset -all -f /boot/beos/system/servers
|
sleep 3
|
||||||
# mimeset -all -f /boot/apps
|
|
||||||
rm $FRESH_INSTALL_INDICATOR_FILE
|
# execute scripts
|
||||||
|
for f in $postInstallDir/*.sh; do
|
||||||
|
if [ -f $f ]; then
|
||||||
|
echo "Running post install script $f ..." > /dev/dprintf
|
||||||
|
$f
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
sync
|
||||||
|
rm $freshInstallIndicator
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user