#!/bin/sh

/etc/scripts/shell_action.sh showReboot

REBOOT=$1
get_lan()
{
    LAN=`sysconf /etc/speaker.conf get system language`
}

get_lan

/usr/bin/amixer -q sset 'Master',0 29

/etc/scripts/pa_mute.sh 0

if [ "u_${LAN}" = "u_cn" ];then
    if [ "$REBOOT" == "1" ];then
        mpg123 -r 48000 /usr/share/sounds/cn/reboot_zh.mp3
    else
        mpg123 -r 48000 /usr/share/sounds/cn/zh.mp3
    fi
else
    if [ "$REBOOT" == "1" ];then
        mpg123 -r 48000 /usr/share/sounds/en/reboot_en.mp3
    else
        mpg123 -r 48000 /usr/share/sounds/en/en.mp3
    fi
fi

/etc/scripts/pa_mute.sh 1
