#!/bin/bash
system-recovery(){

/usr/bin/Xorg :1 & 2>&1>/dev/null
export DISPLAY=:1
export LANG=zh_CN.UTF-8
DISPLAY=:1 /usr/bin/marco & 2>&1>/dev/null
sleep 5
#/usr/sbin/recovery-run-background.sh
sleep 2
DISPLAY=:1 xset s off
DISPLAY=:1 xset -dpms
#/usr/sbin/recovery-run-background.sh kill
DISPLAY=:1 /usr/sbin/system-recovery &
}

run_anaconda(){

#/usr/bin/python /sbin/anaconda
/usr/bin/tmux -u -f /usr/share/anaconda/tmux.conf start

}

cat /proc/cmdline |grep "backup" > /dev/null
if [ $? -eq 0 ];then
        system-recovery
else
        run_anaconda
fi

