fixed merge conflicts
This commit is contained in:
commit
f60111fa45
|
@ -18,7 +18,7 @@ touch ${LOCK_FILE}
|
||||||
|
|
||||||
## Register ourself as the running FunKey task for receiving USR1
|
## Register ourself as the running FunKey task for receiving USR1
|
||||||
## signal for shutting down
|
## signal for shutting down
|
||||||
echo $$ > "/var/run/funkey.pid"
|
pid record $$
|
||||||
|
|
||||||
## Binaries
|
## Binaries
|
||||||
PROD_SCREEN_BIN="/usr/local/sbin/funkey_prod_screens"
|
PROD_SCREEN_BIN="/usr/local/sbin/funkey_prod_screens"
|
||||||
|
@ -224,7 +224,7 @@ function launch_tests_up_until_magnet {
|
||||||
|
|
||||||
## Register ourself back as the running FunKey task for receiving USR1
|
## Register ourself back as the running FunKey task for receiving USR1
|
||||||
## signal for shutting down
|
## signal for shutting down
|
||||||
echo $$ > "/var/run/funkey.pid"
|
pid record $$
|
||||||
|
|
||||||
# check magnet test result
|
# check magnet test result
|
||||||
if [[ "$res" == "0" ]]; then
|
if [[ "$res" == "0" ]]; then
|
||||||
|
|
|
@ -23,46 +23,46 @@ fi
|
||||||
|
|
||||||
case ${1} in
|
case ${1} in
|
||||||
load)
|
load)
|
||||||
if [ ${#} -ne 1 ]; then
|
if [ ${#} -ne 1 ]; then
|
||||||
usage
|
usage
|
||||||
fi
|
|
||||||
|
|
||||||
# Umount any remaining OPK, if any
|
|
||||||
umount /opk >/dev/null 2>&1
|
|
||||||
|
|
||||||
# Mount last OPK, if any
|
|
||||||
if [ -r "${LAST_OPK_FILE}" ]; then
|
|
||||||
last_opk=$(cat "${LAST_OPK_FILE}")
|
|
||||||
mount -t squashfs "${last_opk}" /opk
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Remove unnecessary files
|
|
||||||
rm -f "${RESUME_PLAY_FILE}"
|
|
||||||
|
|
||||||
# Launch Previous Game if any
|
|
||||||
if [ -f "${INSTANT_PLAY_FILE}" ]; then
|
|
||||||
keymap resume
|
|
||||||
echo -n "Found Instant Play file, restarting previous game with command: "
|
|
||||||
cat "${INSTANT_PLAY_FILE}"
|
|
||||||
mv "${INSTANT_PLAY_FILE}" "${RESUME_PLAY_FILE}"
|
|
||||||
source "${RESUME_PLAY_FILE}"
|
|
||||||
rm -f "${RESUME_PLAY_FILE}"
|
|
||||||
keymap default
|
|
||||||
termfix_all
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Unmount last OPK, if any
|
|
||||||
if [ -r "${LAST_OPK_FILE}" -a ! -f "${REBOOTING_FILE}" ]; then
|
|
||||||
umount /opk
|
|
||||||
rm "${LAST_OPK_FILE}"
|
|
||||||
fi
|
fi
|
||||||
;;
|
|
||||||
|
# Umount any remaining OPK, if any
|
||||||
|
umount /opk >/dev/null 2>&1
|
||||||
|
|
||||||
|
# Mount last OPK, if any
|
||||||
|
if [ -r "${LAST_OPK_FILE}" ]; then
|
||||||
|
last_opk=$(cat "${LAST_OPK_FILE}")
|
||||||
|
mount -t squashfs "${last_opk}" /opk
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove unnecessary files
|
||||||
|
rm -f "${RESUME_PLAY_FILE}"
|
||||||
|
|
||||||
|
# Launch Previous Game if any
|
||||||
|
if [ -f "${INSTANT_PLAY_FILE}" ]; then
|
||||||
|
keymap resume
|
||||||
|
echo -n "Found Instant Play file, restarting previous game with command: "
|
||||||
|
cat "${INSTANT_PLAY_FILE}"
|
||||||
|
mv "${INSTANT_PLAY_FILE}" "${RESUME_PLAY_FILE}"
|
||||||
|
source "${RESUME_PLAY_FILE}"
|
||||||
|
rm -f "${RESUME_PLAY_FILE}"
|
||||||
|
keymap default
|
||||||
|
termfix_all
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Unmount last OPK, if any
|
||||||
|
if [ -r "${LAST_OPK_FILE}" -a ! -f "${REBOOTING_FILE}" ]; then
|
||||||
|
umount /opk
|
||||||
|
rm "${LAST_OPK_FILE}"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
save)
|
save)
|
||||||
if [ ${#} -lt 2 ]; then
|
if [ ${#} -lt 2 ]; then
|
||||||
usage
|
usage
|
||||||
fi
|
fi
|
||||||
shift
|
shift
|
||||||
|
|
||||||
# Get curent binary real path
|
# Get curent binary real path
|
||||||
bin=$(printf %s "$1" | sed "s/'/'\\\\''/g")
|
bin=$(printf %s "$1" | sed "s/'/'\\\\''/g")
|
||||||
|
@ -76,31 +76,30 @@ save)
|
||||||
printf "' " >> "${INSTANT_PLAY_FILE}"
|
printf "' " >> "${INSTANT_PLAY_FILE}"
|
||||||
shift
|
shift
|
||||||
|
|
||||||
while [ "$#" != "0" ]
|
while [ "$#" != "0" ]
|
||||||
do
|
do
|
||||||
printf "'" >> "${INSTANT_PLAY_FILE}"
|
printf "'" >> "${INSTANT_PLAY_FILE}"
|
||||||
printf %s "$1" | sed "s/'/'\\\\''/g" >> "${INSTANT_PLAY_FILE}"
|
printf %s "$1" | sed "s/'/'\\\\''/g" >> "${INSTANT_PLAY_FILE}"
|
||||||
printf "' " >> "${INSTANT_PLAY_FILE}"
|
printf "' " >> "${INSTANT_PLAY_FILE}"
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
# Add the magic sauce to launch the process in background,
|
# Add the magic sauce to launch the process in background,
|
||||||
# record the PID into a file, wait for the process to
|
# record the PID into a file, wait for the process to
|
||||||
# terminate and erase the recorded PID
|
# terminate and erase the recorded PID
|
||||||
cat << EOF >> "${INSTANT_PLAY_FILE}"
|
cat << EOF >> "${INSTANT_PLAY_FILE}"
|
||||||
&
|
&
|
||||||
pid record \$!
|
pid record \$!
|
||||||
wait \$!
|
wait \$!
|
||||||
pid erase
|
pid erase
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Now terminate gracefully
|
# Now terminate gracefully
|
||||||
exec powerdown now
|
exec powerdown now
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ case "${1}" in
|
||||||
erase_pid
|
erase_pid
|
||||||
;;
|
;;
|
||||||
|
|
||||||
print)
|
print)
|
||||||
cat "${PID_FILE}"
|
cat "${PID_FILE}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
#set -x
|
#set -x
|
||||||
|
|
||||||
SELF="$(basename ${0})"
|
SELF="$(basename ${0})"
|
||||||
PID_FILE="/var/run/funkey.pid"
|
|
||||||
REBOOTING_FILE="/run/rebooting"
|
REBOOTING_FILE="/run/rebooting"
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
|
@ -18,7 +17,7 @@ schedule_powerdown() {
|
||||||
|
|
||||||
# Send USR1 signal to the running FunKey process to warn about
|
# Send USR1 signal to the running FunKey process to warn about
|
||||||
# impending shutdown
|
# impending shutdown
|
||||||
pkill -USR1 -F "${PID_FILE}" > /dev/null 2>&1
|
pkill -USR1 "$(pid print)" > /dev/null 2>&1
|
||||||
|
|
||||||
# Delay for the given grace period seconds to catch signal USR2.
|
# Delay for the given grace period seconds to catch signal USR2.
|
||||||
# If the signal is caught, then it means the running FunKey
|
# If the signal is caught, then it means the running FunKey
|
||||||
|
|
|
@ -5,6 +5,6 @@
|
||||||
|___| |_____|__|__||__|\__||_____|___ |
|
|___| |_____|__|__||__|\__||_____|___ |
|
||||||
FUN ON A KEYCHAIN |_____|
|
FUN ON A KEYCHAIN |_____|
|
||||||
-----------------------------------------------------
|
-----------------------------------------------------
|
||||||
Version 2.1.1 (Recovery)
|
Version 2.3.0 (Recovery)
|
||||||
-----------------------------------------------------
|
-----------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
NAME="FunKey-OS Recovery"
|
NAME="FunKey-OS Recovery"
|
||||||
VERSION="2.1.1 (Vitriolic Vulture)"
|
VERSION="2.3.0 (Zen Zebu)"
|
||||||
ID=funkey-recovery
|
ID=funkey-recovery
|
||||||
ID_LIKE=buildroot
|
ID_LIKE=buildroot
|
||||||
PRETTY_NAME="FunKey-OS Recovery 2.1.1"
|
PRETTY_NAME="FunKey-OS Recovery 2.3.0"
|
||||||
VERSION_ID="2.1.1"
|
VERSION_ID="2.3.0"
|
||||||
HOME_URL="https://www.funkey-project.com/"
|
HOME_URL="https://www.funkey-project.com/"
|
||||||
SUPPORT_URL="https://www.funkey-project.com/"
|
SUPPORT_URL="https://www.funkey-project.com/"
|
||||||
BUG_REPORT_URL="https://www.funkey-project.com/"
|
BUG_REPORT_URL="https://www.funkey-project.com/"
|
||||||
PRIVACY_POLICY_URL="https://www.funkey-project.com"
|
PRIVACY_POLICY_URL="https://www.funkey-project.com"
|
||||||
VERSION_CODENAME=Vitriolic
|
VERSION_CODENAME=Zen
|
||||||
UBUNTU_CODENAME=Vitriolic
|
UBUNTU_CODENAME=Zen
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Recovery 2.1.1
|
Recovery 2.3.0
|
||||||
|
|
Loading…
Reference in New Issue