From 1ed801bbd7e70c647d8fb239e70a8ea07ba08dbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Thu, 22 Jul 2010 20:18:35 +0000 Subject: [PATCH] Launch the notification_server at boot. Add notification when mime sniffing files on first boot, at least it gives a visual indication of why so much cpu is consumed. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37700 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- data/common/boot/post_install/mime_update.sh | 18 ++++++++++++++++++ data/system/boot/Bootscript | 5 +++++ 2 files changed, 23 insertions(+) diff --git a/data/common/boot/post_install/mime_update.sh b/data/common/boot/post_install/mime_update.sh index 18547cc3e0..0f60707423 100755 --- a/data/common/boot/post_install/mime_update.sh +++ b/data/common/boot/post_install/mime_update.sh @@ -1,5 +1,15 @@ #!/bin/sh +_progress () { + notify --type progress --app mimeset \ + --icon /boot/system/apps/DiskProbe \ + --messageID $0_$$ \ + --title "Updating file MIME types..." \ + --progress $1 "$2" >/dev/null +} + +_progress 0.1 "desktop files" + # Make sure files on the desktop are mimeset first for f in $(/bin/finddir B_DESKTOP_DIRECTORY 2>/dev/null\ @@ -13,10 +23,18 @@ done SYSTEM=$(/bin/finddir B_SYSTEM_DIRECTORY 2>/dev/null || echo "/boot/system") +_progress 0.1 "system applications" mimeset -apps -f "$SYSTEM/apps" +_progress 0.2 "documentation" mimeset -f "$SYSTEM/documentation" +_progress 0.3 "preferences" mimeset -apps -f "$SYSTEM/preferences" +_progress 0.4 "servers" mimeset -apps -f "$SYSTEM/servers" +_progress 0.5 "applications" mimeset -apps -f "/boot/apps" +_progress 0.7 "application (by signature)" query -f 'BEOS:APP_SIG=*' | xargs --no-run-if-empty mimeset -apps -f + +_progress 1.0 "done" diff --git a/data/system/boot/Bootscript b/data/system/boot/Bootscript index a09d158749..d3dbea5ac0 100644 --- a/data/system/boot/Bootscript +++ b/data/system/boot/Bootscript @@ -159,6 +159,11 @@ if [ "$SAFEMODE" != "yes" ]; then launch $SERVERS/cddb_daemon "" fi +# Launch Notification Server +if [ "$SAFEMODE" != "yes" ]; then + launch $SERVERS/notification_server "" +fi + # Check for daily saving time launch system/bin/dstcheck