fastboot: alsa-state: Run init script earlier and in the background.
authorChia-I Wu <olv@openmoko.com>
Tue, 28 Oct 2008 08:48:24 +0000 (16:48 +0800)
committerJohn Lee <john_lee@openmoko.org>
Mon, 12 Jan 2009 06:29:26 +0000 (14:29 +0800)
packages/alsa/alsa-state.bb
packages/alsa/alsa-state/alsa-state

index ba030e4..9e7f157 100644 (file)
@@ -7,7 +7,7 @@
 DESCRIPTION = "Alsa Scenario Files"
 LICENSE = "MIT"
 PV = "0.2.0"
-PR = "r0"
+PR = "r1"
 
 SRC_URI = "\
   file://asound.conf \
@@ -19,7 +19,7 @@ SRC_URI = "\
 inherit update-rc.d
 
 INITSCRIPT_NAME = "alsa-state"
-INITSCRIPT_PARAMS = "defaults 10"
+INITSCRIPT_PARAMS = "start 39 S ."
 
 do_install() {
     install -d ${D}${sysconfdir}/init.d
@@ -50,5 +50,9 @@ pkg_postinst_${PN}() {
                then
                        /usr/sbin/alsactl -f ${sysconfdir}/asound.state restore
                fi
+               # INITSCRIPT_PARAMS changed, so remove the old and
+               # install the new setting.
+               update-rc.d -f ${INITSCRIPT_NAME} remove
+               update-rc.d ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS}
        fi
 }
index c6bc1fd..84cdf03 100755 (executable)
@@ -11,7 +11,7 @@ asound_restore(){
        echo "ALSA: Restoring mixer settings..."
        if test -x /usr/sbin/alsactl -a -e /etc/asound.state
        then
-               /usr/sbin/alsactl -f /etc/asound.state restore
+               /usr/sbin/alsactl -f /etc/asound.state restore &
        fi
 }