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
This commit is contained in:
François Revol 2010-07-22 20:18:35 +00:00
parent f48ad0d968
commit 1ed801bbd7
2 changed files with 23 additions and 0 deletions

View File

@ -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"

View File

@ -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