[WebOS Software Development] silvioster:
continuation of upstart scripts after Luna Service hub is started

"ls-hubd_public-ready" (emitted using /sbin/initctl from within /usr/bin/ls-hubd)
-> finish, node_fork_server

-> /etc/event.d/node_fork_server
if memtotal from /proc/meminfo >524288 (512M)
mkdir -p /var/palm/node
touch /var/palm/node/fork
/usr/palm/nodejs/node --max_old_space_size=23068672 /usr/palm/nodejs/fork_server.js ## 23068672=22MB
/sbin/initctl emit --no-wait node_fork_server-ready
else /sbin/initctl emit node_fork_server-ready

emit "node_fork_server-ready" -> no listeners
..emit "stopping/stopped node_fork_server" -> no listeners

-> /etc/event.d/finish
# record upstart timing for boottime tracking.
# $EARLY_BOOT_PID is set in /sbin/boot-init, ran from /sbin/tcpostflash.sh, /sbin/mkbootfs.sh, /sbin/upstart
mkdir -p /tmp/misc-props
echo -n $EARLY_BOOT_PID > /tmp/misc-props/pids.early_start
echo -n $EARLY_BOOT_START > /tmp/misc-props/timing.early_start
echo -n $EARLY_BOOT_STOP > /tmp/misc-props/timing.early_stop
echo -n $UPSTART_STARTTIME > /tmp/misc-props/timing.upstart_begin
echo -n $$ > /tmp/misc-props/pids.upstart_finish
echo -n `date -U` > /tmp/misc-props/timing.upstart_finish
/etc/init.d/bootmark.sh start
echo (16_random_bytes_in_hex) > /var/log/bootmark
run-parts /etc/event.d/finish-poststart.d
/etc/event.d/finish-poststart.d/001-mountcrypt
/usr/bin/mountcrypt /dev/mapper/store-mojodb store-cryptodb /dev/mapper/store-filecache store-cryptofilecache
mount /var/db
mount /var/file-cache
/etc/event.d/finish-poststart.d/020-setup_jails
rm -f /etc/nojail

emit "stopping/stopped finish" ->
logctld, configurator, mojodb, powerlog, PmNetConfigManager, pulseaudio, LunaDownloadMgr,
eventreporter, powerd, rdxd, lnsawait, Qmuxd, bluetooth, fontconfig_cache, certstoreinit,
tempdb, qcomm_rmt_storage, keymanager, filecache, hidd, memchute, passthrud, ossinfo,
mediaserver, audiod, PmModemEfsLogger, extractfs, TelephonyInterfaceLayer

-> TelephonyInterfaceLayer (no listeners for stop signals)
exec /usr/bin/PmWsfDaemon -c /etc/til.d/tilwsf.conf # /usr/lib/libTelephonyInterfaceLayer.so, -c /etc/til.d/til.conf
#Src/Core/NativeHost/BladeLoaderDl.cpp:101 dlopen()
#Src/Core/NativeHost/BladeLoaderDl.cpp:373 Calling %s to create service blade
#Luna Type=LunaTelephony,LunaMessaging ServiceName=com.palm.telephony
#LaunchCodeExternalApp=com.palm.app.phonediag
#LaunchCodeExternalAppCodesCdma=786;3836;33284;3282;477;673;123;889;8378;3366;\
#..72346;633;8766;87633;2539;7738;66236;2833766;28337633;
#LaunchCodeExternalAppCodesGsm=786;
#LunaMessaging ServiceName=com.palm.messagingrouter Interface=LunaInterfaceSms
#services supported by the GSM phone
#THandlersGsm=ServiceStateGsm;ServiceCallGsm;ServiceSmsGsm;ServiceLbsGsm;ServiceAudioGsm;
#..ServiceDeviceUsageGsm;ServiceSsGsm;ServiceDeviceCfgGsm;ServiceDataGsm;
#PHandlers=ServiceSim;ServicePower;ServiceSpb;ServiceStk;
# sprint verizon bellmo chinatel

-> extractfs (no listeners for stop signals)
mkdir -p /var/luna/data/extractfs
/usr/bin/extractfs -f /var/luna/data/extractfs #something to do with image extraction
umount -f /var/luna/data/extractfs

-> PmModemEfsLogger (no stop listeners)
# no modem in /proc/cmdline for normal users => not doing anything, otherwise PmModemEfsLogger would log ramdump etc

-> audiod (no stop listeners)
/usr/sbin/audiod -n -1 # com.palm.audio version 368.49, uses /etc/audio/{a,b,c}/global.conf
#/home/reviewdaemon/projects/nova/oe/BUILD-mantaray/staging/
#..arm-none-linux-gnueabi/include/boost/dynamic_bitset/dynamic_bitset.hpp etc

-> mediaserver (no stop listeners)
ionice -c1 /usr/bin/mediaserver --gst-debug=1 # version 428.51, should have been --gst-debug-level=1

-> ossinfo (no stop listeners) #copies PDF to media partition
cp /usr/lib/ossinfo/Open\ Source\ Information.pdf /media/internal/Open\ Source\ Information.pdf

-> passthrud (no stop listeners) #com.palm.usbpassthrough
#/usr/bin/start-passthrud # would run if had /var/preferences/com.palm.usbpassthrough/passthrud.conf

-> memchute (no stop listeners)
echo "0,85,95,114,120" > /sys/module/lowmemnotify/parameters/thresholds_enter
echo "0,80,90,108,112" > /sys/module/lowmemnotify/parameters/thresholds_leave
/usr/sbin/memchute # kills top 5 memory-using-procs if >THRESHOLD when low on memory

-> hidd (no stop listeners)
mkdir -p /dev/cgroup/input
echo $$ > /dev/cgroup/input/tasks #current process id
/usr/bin/hidd -v -f /etc/hidd/HidPlugins.xml --output-syslog
#plugins: keypad,touchpanel,accelerometer,compass,proximity,lightg,AVrcp(bluetooth),inputdev

-> keymanager (no listeners)
/usr/bin/keymanager -c '{"log":{"appender":{"type":"syslog"},"levels":{"default":"warning","keymanager":"info"}}}'
#using /var/palm/data/keys.db, /var/palm/data/otakeys.db, 4809febfe1df7d2a108fddc388cdb29e
#.. store-cryptodb.key, store-cryptofilecache.key, /var/luna/data/.passcode, "please", "youdidntsaythemagicword"
#does sql-style db work: SELECT id,ownerID,keyID,data,keysize,type,scope,hash FROM keytable WHERE id = ?
#.. SELECT id FROM keytable WHERE ownerId LIKE ?
# "EJGlZxDhLvgXn+p/K9s8gQ==" (base64)

-> qcomm_rmt_storage (no listeners)
/usr/sbin/qcom_rmt_storage /dev/mmcblk0p7 /dev/mmcblk0p8
#uses /dev/rmt_storage, /boot/modem_fs1, /boot/modem_fs2

-> tempdb (no listeners)
#does nothing!

-> certstoreinit (no listeners)
mkdir -p /var/ssl/crl
zcat /etc/ssl/crl/*.gz >/var/ssl/crl/crl-bundle.crl
mkdir -p /var/ssl/trustedcerts
cd /var/ssl/trustedcerts && tar xzf /etc/ssl/certs/calinks.tgz
mkdir -p /var/ssl/public
echo '01' > /var/ssl/serial
mkdir -p /var/ssl/certs
mkdir -p /var/ssl/private
touch /var/ssl/index.txt
luna-send -n 1 luna://com.palm.certificatemanager/addcrl \
'{"url":"http://crl.palm-contentid.pp.trustcenter.de/crl/v2/palmcontentid-CA-I.crl"}'

-> bluetooth (no listeners)
/usr/bin/BluetoothMonitor

-> Qmuxd (no listeners)
/usr/bin/Qmuxd #RMNET qmi connection

-> lnsawait (no listeners)
# "preventing started event from going out" ?
initctl status lnsa_marker
if no status -> loop. otherwise return ok
# should return nonzero since /var/palm/event.d was added to initctl dirs previously
# during mountall->mountall.sh->postmountall.d/lnsasetup

-> rdxd (no listeners)
/usr/bin/rdxd -s #Remote Diagnostics (incl. Telephony)
#uses /etc/rdxd.conf, /usr/lib/rdxd/*.sh scripts

-> powerd (no listeners)
mkdir -p /var/preferences/com.palm.power
cp /usr/var/preferences/com.palm.power /var/preferences/com.palm.power #use cp tmp;sync;mv tmp real
#config /sys/ parameters for PM on msm8x60, not applicable to phones
#for other devices seems there's nothing extra to do

-> eventreporter (no listeners)
/usr/bin/eventreporterserver #uses /tmp/evts.sock, /tmp/events.dat, JSON messages

-> LunaDownloadMgr (no listeners)
mkdir -p /dev/cgroup/web
echo $$ >/dev/cgroup/web/tasks # puts current process into web cgroup, later done with setcpushares-task
env CHARSET="UTF-8" /usr/bin/LunaDownloadMgr # ionice -c 3 on TouchPad (topaz)
# palm://com.palm.connectionmanager/setnovacommode {"isEnabled":true, "bypassFirstUse":false}
# palm://com.palm.connectionmanager/getStatus {"subscribe":true}
# palm://com.palm.bus/signal/registerServerStatus {"serviceName":"com.palm.connectionmanager", "subscribe":true}
# palm://com.palm.lunabus/signal/addmatch {"category":"/storaged", "method":"MSMAvail"}
# .. {"category":"/storaged", "method":"MSMProgress"}
# .. {"category":"/storaged", "method":"MSMEntry"}
# .. {"category":"/storaged", "method":"MSMFscking"}
# uses curl for downloads, /etc/palm/downloadManager.conf, /etc/palm/downloadManager-platform.conf
# logs into db: "DELETE FROM DownloadHistory WHERE owner = %", "DELETE FROM DownloadHistory WHERE ticket = %lu"

-> powerlog (no listeners)
/usr/sbin/powerlog -i 60 -c $CPUCOUNT -f $FREQ_COUNT -m
# cpucount = cpus, freq_count=number of freqs, -i60=60seconds, -m=topmemusers

-> mojodb (no listeners)
/usr/bin/mojodb-luna -c /etc/palm/mojodb.conf /var/db #version 1.9-52.16-mantaray, using /tmp/mojodb/tempdb_init

-> logctld (no listeners)
/usr/bin/logctld -v
#GPS: /var/log/gpsfixes, /var/log/gpsfixes_*.csv
#calls /sbin/logctld_clear_all.sh, /sbin/logctld_collect_all.sh
#palm://com.palm.service.collectlogs/autosend

-> pulseaudio
mkdir -p /home/root/.pulse
ionice -c1 /usr/bin/pulseaudio --log-target=syslog
#uses /etc/pulse/system.pa , /etc/pulse/default.pa, /etc/pulse/daemon.conf, /usr/lib/pulse-0.9.22/modules
#compiled using: /home/reviewdaemon/projects/nova/oe/BUILD-mantaray/staging/arm-none-linux-gnueabi/include
#.. -fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -fno-strict-aliasing
#.. -fno-inline-functions -g -ffast-math -D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option

emit "started pulseaudio" -> systemsoundsloader
->> systemsoundsloader (no listeners)
/usr/bin/systemSoundsLoader #loadSystemSounds from /usr/share/systemsounds/* or *-ondemand.pcm

-> fontconfig_cache
ionice -c 3 nice -n 20 fc-cache #run cache rebuild as nicely as possible
touch /var/cache/fontconfig/cached

emit "stopped fontconfig_cache" -> browserserver, smartkey
->>smartkey (no listeners)
mkdir -p /dev/cgroup/web
echo $$ > /dev/cgroup/web/tasks # this process goes into web cgroup
/usr/bin/SmartKeyService #SpellChecker - find best candidates based on dictionary, score map, frequency map
#uses XT9: /usr/palm/smartkey/XT9, /etc/palm/smartkey.conf

->>browserserver (no listeners)
export LD_PRELOAD="/usr/lib/libptmalloc3.so" #use custom malloc for browser
mkdir -p /dev/cgroup/web
echo $$ > /dev/cgroup/web/tasks # files this process into web control group
/usr/bin/BrowserServer #version 2.0.0-237.13, -d 30000 on TouchPad (topaz) +browserservermojo
#uses /var/luna/data/browser/icons, /var/palm/data/browser-cookies.db /dev/msm_vidc_dec /dev/pmem_adsp
chmod -R g+w /var/ssl
chown -R root.luna /var/ssl
chown luna:luna -R /var/palm/data/http_* /var/palm/data/https_*
chmod -R o+rwx /var/palm/data/http_* /var/palm/data/https_*
#conf from /etc/palm/browser-app.conf, /etc/palm/browser-app-platform.conf, /etc/ssl/openssl.cnf

-> filecache
/usr/bin/filecache -c {\"log\":{\"appender\":{\"type\":\"syslog\"},\"levels\":{\"default\":\"warning\"}}}

emit "started filecache" -> LunaSysService, LunaUniversalSearchMgr
->>LunaSysService
/usr/bin/LunaSysService
#uses /usr/lib/luna/customization/region.json, /etc/palm/region.json,
#.. /usr/lib/luna/customization/locale.txt, /etc/palm/locale.txt,
#.. /etc/palm/defaultPreferences.txt, /etc/palm/defaultPreferences-platform.txt
#.. /usr/lib/luna/customization/cust-preferences.txt, /etc/palm/CustomerCareNumber.txt
#.. /var/luna/preferences/systemprefs.db, systemprefs_backup.db
# does ntp time update from ntp0.palmws.com (ntpdate -bqu)
#.. /etc/palm/palm-customization-info
->>LunaUniversalSearchMgr (no listeners)
export LD_PRELOAD=/usr/lib/libmemcpy.so
/usr/bin/LunaUniversalSearchMgr
# addDBSearchItem/removeDBSearchItem, modifyActionProvider
# /usr/lib/luna/customization/resources/*/UniversalSearchList.json
# SELECT value FROM SearchPreference WHERE key=%Q
# CREATE TABLE IF NOT EXISTS SearchList (id TEXT, category TEXT, displayName TEXT, iconFilePath TEXT, url TEXT,
# suggestURL TEXT, launchParam TEXT, type TEXT, enabled INTEGER, version INTEGER, PRIMARY KEY(id, category) );
# CREATE TABLE IF NOT EXISTS DBSearchList (id TEXT PRIMARY KEY, category TEXT, displayName TEXT,
# iconFilePath TEXT, url TEXT, launchParam TEXT, launchParamDbField TEXT, dbQuery TEXT, displayFields TEXT,
# batchQuery INTEGER, enabled INTEGER, version INTEGER );
# CREATE TABLE IF NOT EXISTS SearchPreference (key TEXT NOT NULL ON CONFLICT FAIL UNIQUE ON CONFLICT REPLACE,
# value TEXT);

-> PmNetConfigManager
/usr/bin/PmNetConfigManager
#logs to /tmp/netconfigmanager.log
#interfaces with netfilter, iptables, enabling/disabling nat, routes, mtu clamping:
# /usr/sbin/iptables -D FORWARD -t mangle -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
# /usr/sbin/iptables -A FORWARD -t mangle -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
# /usr/sbin/iptables -t nat --flush
# RTSP: /usr/sbin/iptables -I INPUT -p udp --sport 6970:6999 -j ACCEPT
# mDNS: /usr/sbin/iptables -I OUTPUT -p udp -m udp --dport 5353 -o %s -j DROP
# NAT: /usr/sbin/iptables -t nat -I POSTROUTING -o %s -j MASQUERADE
# /sbin/dhclient -d -cf /etc/pmnetconfig/webOsDhclient.conf -sf /etc/pmnetconfig/webOsDhclient-script -lf -pf ..
# /usr/bin/ntpdate -uq %s pool.ntp.org
# traceroute,ping,arping, wifi authenticator,tether, /etc/pmnetconfig/staticroutes, novacom
# /sbin/sysctl -n -e -q -p /etc/pmnetconfig/netsysctrl.conf
# /sbin/ip rule flush; /proc/sys/net/ipv4/route/flush

emit "started PmNetConfigManager" -> mdnsd, PmWiFiService
->>mdnsd (no listeners)
/usr/sbin/mdnsd -debug # mDNSResponder-258.14, /etc/mdnsd.conf -> /var/log/mdnsd.log
# services url: http://www.dns-sd.org/ServiceTypes.html

->>PmWifiService (no listeners)
check if /dev/tokens/WIFIoADDR exists
/usr/bin/PmWiFiService
# hardwired for Atheros AR6000:
# insmod /lib/modules/`uname -r`/kernel/net/wifi/ar6000.ko || rmmod ar6000
# /tmp/ath6k/token_bdata.SD32.bin || /var/preferences/com.palm.wifi/skip-token-caldata
# ath6k/hw2.1.1/bdata.SD32.bin ath6k/hw2.1.1/3g_bdata.SD32.bin ath6k/hw2.1.1/lte_bdata.SD32.bin
# /lib/firmware/ath6k
# uses /usr/sbin/wpa_supplicant and hostapd
# /sbin/dhclient -cf /etc/PmWiFiDhclient.conf -sf /etc/PmWiFiDhclient-script -lf -pf /var/run/dhclient.eth0.pid

-> configurator
!	luna-send -n 1 palm://com.palm.configurator/run '{"types":["dbkinds","filecache"]}' # triggers service launch?
!	luna-send -n 1 palm://com.palm.configurator/run '{"types":["dbpermissions"]}' # triggers service launch?
initctl emit datastore-initialized
-> "datastore-initialized" -> /etc/event.d/activitymanager
->>activitymanager # manages activity lists, cgroup priorities
/usr/bin/activitymanager -c {\"log\":{\"appender\":{\"type\":\"syslog\"},\"levels\":{\"default\":\"warning\"}}}
/sbin/initctl emit activitymanager-ready
-> "activitymanager-ready" -> configurator-async, filenotifyd, UpdateDaemon
->>configurator-async (no listeners)
!	luna-send -n 1 palm://com.palm.configurator/run '{"types":["activities"]}' #triggers service?
->>filenotifyd (no listeners)
ionice -c2 -n7 /usr/bin/filenotifyd
# create table if not exists files (path TEXT UNIQUE ON CONFLICT REPLACE,
# size INTEGER, modified INTEGER)
# create table if not exists actions (revision INTEGER PRIMARY KEY AUTOINCREMENT,
# action_type INTEGER, size INTEGER, modified INTEGER, path TEXT, new_path TEXT)
# insert into files (path, size, modified) values (?,?,?) // insert
# select size, modified from files where path=? // get
# delete from files where path=? // remove
# update files set path=? where path=? // rename
# select path, size, modified from files where path like ? // directory list
# insert into actions (action_type, size, modified, path, new_path) values (?,?,?,?,?)
# select revision, action_type, size, modified, path, new_path from actions
# where revision >= ? order by revision asc limit ?
# select count(*) from action
# delete from actions where revision < ?
->>UpdateDaemon (no listeners)
/usr/bin/UpdateDaemon
# mount /var/lib/update
# tar xvzf /var/lib/update/data.tar.gz -m --no-same-owner --no-same-permissions
# OmaDm [-set_domain|-client|-task|-server|-prepare]
# server: https://ps.palmws.com/palmcsext/swupdateserver
# curl proxy: 68.28.31.33:80 (sprint), headers
# Expect: Cache-Control: no-cache
# User-Agent: palm/1.0 // InitHeader ?
# User-Agent: HTTP SyncML Client [en] (WinNT; I)
# Accept-Language: en
# Accept: application/vnd.syncml.dm+xml
# Content-Type: application/vnd.syncml.dm+xml
# Accept-Charset: utf-8
# x-syncml-hmac: algorithm= , username=" ", mac=
# name: omadm.swupdate.palm.com
# password: serverguestpassword
# name: guest
# passwird: guestpassword
# extra ips: 68.28.15.12, 68.28.31.12, 63.168.238.41, 68.168.229.130
# /var/lib/update/PmUpdater // /usr/bin/PmUpdater exists
#/usr/bin/mmipkg, /sbin/tellbootie

!	luna-send -n 1 palm://com.palm.configurator/run '{"types":["activities"]}' # triggers service launch?

emit "stopped configurator" -> LunaSysMgr, PmWanDaemon
->>PmWanDaemon (no listeners)
/usr/bin/PmWsfDaemon -c /etc/wan.d/wan.conf # load /usr/lib/libPmWsfWanBlade.so
# set up wan connection, check TETH-ENTITLEMENT

->>LunaSysMgr
emit "started LunaSysMgr" -> CustomizationService, firstuse-createDefaultAccount,
mediasyncexporter, pubsubservice, vpnremover-eventd

->> CustomizationService (no listeners)
luna-send -n 1 luna://com.palm.lunabus/signal/registerServerStatus '{"serviceName":"com.palm.systemservice","subscribe":true}'
# up to 3 times, 10sec retry, until "connected" in output
luna-send -n 1 luna://com.palm.service.customization/customize '{}'
# up to 4 times, 15sec retry, until "connected" in output

->> firstuse-createDefaultAccount (no listeners)
luna-send -n 1 palm://com.palm.accountservices/createNovaAccount '{"createDefaultAccount":true}'

->> mediasyncexporter (no listeners)
if exists /media/internal/iPod_Control # means there is media data to export
luna-send -i -n 1 palm://com.palm.activitymanager/create \
'{"start":true, \
"type":{"priority":"lowest"}, \
"activity":{"name":"mediasyncexporter", "description": "export media sync data to standard media files", \
"callback": {"method": "palm://com.palm.mediasyncexporter/export", "params": {}}}}'

->> pubsubservice (no listeners)
/usr/bin/pubsubservice	#uses /var/pubsub/cache, /var/pubsub/pubsubhandlers.conf, /etc/palm/pubsub_handlers/
# most probably uses xmpp protocol, jabber server j005.palmws.com, http://jabber.org/protocol/pubsub#node_config
# docs here: http://xmpp.org/extensions/xep-0060.html

->> vpnremover-eventd (no listeners)
# ! removes the VPN Service App/Framework from App Catalog !
luna-send -n 1 palm://com.palm.appinstaller/remove '{"packageName": "com.palm.app.vpn"}'
luna-send -n 1 palm://com.palm.appinstaller/remove '{"packageName": "com.palm.app.vpnframework"}'

echo "1" > /proc/sys/vm/overcommit_memory
mkdir -p /var/luna/preferences
mkdir -p /dev/cgroups/ui /dev/cgroups/application /dev/cgroups/focused /dev/cgroups/unfocused \
/dev/cgroups/unfocused/none /dev/cgroups/unfocused/lowest /dev/cgroups/unfocused/low /dev/cgroups/unfocused/normal \
/dev/cgroups/unfocused/high /dev/cgroups/unfocused/highest
/bin/echo $$ > /dev/cgroups/ui/tasks
/bin/echo 18432 > /dev/cgroups/ui/cpu.shares
export LD_PRELOAD="/usr/lib/libptmalloc3.so"
/usr/bin/LunaSysMgr -s [if first-time, add "-u minimal -a com.palm.app.firstuse"]
# use /etc/palm/luna.conf /etc/palm/luna-platform.conf
# application paths defined:
# /var/luna/applications/ /var/palm/data/com.palm.appInstallService /media/cryptofs/apps
# usr/palm/applications usr/palm/packages usr/palm/services
# /media/cryptofs/apps/usr/lib/ipkg/info /media/cryptofs/tmp
# /usr/luna/launchpoints/ /var/luna/launchpoints/
# /usr/lib/luna/system/luna-systemui/ /usr/lib/luna/system/luna-applauncher/
# /usr/palm/sysmgr/images/ /usr/palm/sysmgr/localization /usr/palm/sysmgr-cust/localization
# /var/luna/preferences/
# /usr/palm/command-resource-handlers.json /var/usr/palm/command-resource-handlers-active.json
# SysMgr compiled against Qt 4.6.1, HW egl render mode
# /usr/bin/jailer -t -i %s (launching processes) with LD_PRELOAD libpvrtc.so
# deals with cards and card-processes/subsumers

/sbin/initctl emit first-use-finished
emit "first-use-finished" -> configurator (already ran)

/sbin/initctl emit --no-wait LunaSysMgr-ready
emit "LunaSysMgr-ready" -> LunaReady, tap2share

->> tap2share (no listeners)
/usr/sbin/tap2shared #/dev/a6_[0-9] or a23 device for transfers, topaz has back and rear A6

->> LunaReady
mkdir -p /dev/cgroups/application
/bin/echo $(pidof WebAppMgr) > /dev/cgroups/application/tasks
/bin/echo 2048 > /dev/cgroups/ui/cpu.shares
emit "started LunaReady" -> customization-install
->> customization-install
# call customization service to install any stub apps
luna-send -n 1 -a com.palm.service.customization palm://com.palm.service.customization/postFirstUseInstall '{}'
# hack to turn on wifi after first use the first time only
luna-send -n 1 -a com.palm.service.customization palm://com.palm.wifi/setstate '{ "state": "enabled" }'
# create a semaphore so that the app install and the wifi setting only ever run one time
touch /var/luna/data/Customization/postfirstuse_complete.txt

======================= UPSTART SCRIPTS END HERE =================================

--
luna-send uses liblunaservice.so which uses the previously-started ls-hub for message transfer
/var/preferences/com.palm.bus/public_bus_default
/tmp/com.palm.private_hub /tmp/com.palm.public_hub
HUB_INET_ADDRESS
192.168.2.101:4412 192.168.2.101:4411 127.0.0.1:4412 127.0.0.1:4411
com.palm.configurator = /usr/share/dbus-1/system-services/com.palm.configurator.service

TODO: d-bus/luna services statup...