mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
use $CONFIG_CACHE where possible instead hardcoding '/storage/.cache'
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
9b4349f5f9
commit
c091925c8b
@ -45,7 +45,7 @@ get_target() {
|
||||
}
|
||||
|
||||
# hard reset
|
||||
if [ -f /storage/.cache/reset_oe ] ; then
|
||||
if [ -f $CONFIG_CACHE/reset_oe ] ; then
|
||||
get_target
|
||||
if [ ! -z $target ] ; then
|
||||
echo "hard resetting..."
|
||||
@ -62,7 +62,7 @@ if [ -f /storage/.cache/reset_oe ] ; then
|
||||
fi
|
||||
|
||||
# soft reset
|
||||
if [ -f /storage/.cache/reset_xbmc ] ; then
|
||||
if [ -f $CONFIG_CACHE/reset_xbmc ] ; then
|
||||
get_target
|
||||
if [ ! -z $target ] ; then
|
||||
echo "soft resetting..."
|
||||
|
@ -31,7 +31,7 @@ if [ -e "$BACKUP_FILE" ] ; then
|
||||
echo OK
|
||||
echo -en "restoring.. this may take long time to complete, please wait.. "
|
||||
rm -rf /storage/.xbmc &>/dev/null
|
||||
rm -rf /storage/.cache &>/dev/null
|
||||
rm -rf $CONFIG_CACHE &>/dev/null
|
||||
rm -rf /storage/.config &>/dev/null
|
||||
tar xf $BACKUP_FILE -C / &>/dev/null
|
||||
rm -f $BACKUP_FILE &>/dev/null
|
||||
|
@ -22,7 +22,7 @@
|
||||
#
|
||||
# runlevels: openelec, textmode
|
||||
|
||||
mkdir -p /storage/.cache/connman
|
||||
mkdir -p $CONFIG_CACHE/connman
|
||||
mkdir -p /storage/.config/vpn-config
|
||||
mkdir -p /run/connman
|
||||
|
||||
@ -36,15 +36,15 @@ fi
|
||||
|
||||
# creating initial settings file
|
||||
progress "creating initial connman settings file"
|
||||
if [ ! -f /storage/.cache/connman/settings ]; then
|
||||
cp /usr/share/connman/settings /storage/.cache/connman
|
||||
if [ ! -f $CONFIG_CACHE/connman/settings ]; then
|
||||
cp /usr/share/connman/settings $CONFIG_CACHE/connman
|
||||
fi
|
||||
|
||||
(
|
||||
# setup hostname
|
||||
if [ -f /storage/.cache/hostname ] ; then
|
||||
if [ -f $CONFIG_CACHE/hostname ] ; then
|
||||
progress "Setup hostname"
|
||||
cat /storage/.cache/hostname > /proc/sys/kernel/hostname
|
||||
cat $CONFIG_CACHE/hostname > /proc/sys/kernel/hostname
|
||||
fi
|
||||
|
||||
# starting Connection manager
|
||||
|
@ -19,8 +19,8 @@
|
||||
################################################################################
|
||||
|
||||
wait_for_inet_addr () {
|
||||
if [ -f /storage/.cache/openelec/network_wait ]; then
|
||||
. /storage/.cache/openelec/network_wait
|
||||
if [ -f $CONFIG_CACHE/openelec/network_wait ]; then
|
||||
. $CONFIG_CACHE/openelec/network_wait
|
||||
|
||||
if [ "$WAIT_NETWORK" = "true" ] ; then
|
||||
progress "Wait for network"
|
||||
|
@ -35,9 +35,9 @@
|
||||
OPTIONS="-o 'PasswordAuthentication no'"
|
||||
fi
|
||||
|
||||
RSA1_KEY="/storage/.cache/ssh/ssh_host_key"
|
||||
RSA2_KEY="/storage/.cache/ssh/ssh_host_rsa_key"
|
||||
DSA2_KEY="/storage/.cache/ssh/ssh_host_dsa_key"
|
||||
RSA1_KEY="$CONFIG_CACHE/ssh/ssh_host_key"
|
||||
RSA2_KEY="$CONFIG_CACHE/ssh/ssh_host_rsa_key"
|
||||
DSA2_KEY="$CONFIG_CACHE/ssh/ssh_host_dsa_key"
|
||||
|
||||
KEYGEN="/usr/bin/ssh-keygen"
|
||||
SSHD="/usr/sbin/sshd"
|
||||
@ -51,7 +51,7 @@
|
||||
if [ ! -s $RSA1_KEY ] ; then
|
||||
progress "SSH: generating SSH1 RSA key"
|
||||
|
||||
mkdir -p /storage/.cache/ssh
|
||||
mkdir -p $CONFIG_CACHE/ssh
|
||||
$KEYGEN -q -t rsa1 -f $RSA1_KEY -C '' -N '' >&/dev/null
|
||||
chmod 600 $RSA1_KEY
|
||||
fi
|
||||
@ -60,7 +60,7 @@
|
||||
if [ ! -s $RSA2_KEY ] ; then
|
||||
progress "SSH: generating SSH2 RSA key"
|
||||
|
||||
mkdir -p /storage/.cache/ssh
|
||||
mkdir -p $CONFIG_CACHE/ssh
|
||||
$KEYGEN -q -t rsa -f $RSA2_KEY -C '' -N '' >&/dev/null
|
||||
chmod 600 $RSA2_KEY
|
||||
fi
|
||||
@ -69,7 +69,7 @@
|
||||
if [ ! -s $DSA2_KEY ] ; then
|
||||
progress "SSH: generating SSH2 DSA key"
|
||||
|
||||
mkdir -p /storage/.cache/ssh
|
||||
mkdir -p $CONFIG_CACHE/ssh
|
||||
$KEYGEN -q -t dsa -f $DSA2_KEY -C '' -N '' >&/dev/null
|
||||
chmod 600 $DSA2_KEY
|
||||
fi
|
||||
|
@ -26,8 +26,8 @@
|
||||
(
|
||||
progress "Starting Syslog daemon"
|
||||
|
||||
if [ -e /storage/.cache/syslog/remote ] ; then
|
||||
source /storage/.cache/syslog/remote
|
||||
if [ -e $CONFIG_CACHE/syslog/remote ] ; then
|
||||
source $CONFIG_CACHE/syslog/remote
|
||||
fi
|
||||
|
||||
SYSLOGD_OPTIONS="-L"
|
||||
|
@ -23,8 +23,8 @@
|
||||
# runlevels: openelec
|
||||
|
||||
(
|
||||
if [ -f /storage/.cache/xkb/layout ]; then
|
||||
. /storage/.cache/xkb/layout
|
||||
if [ -f $CONFIG_CACHE/xkb/layout ]; then
|
||||
. $CONFIG_CACHE/xkb/layout
|
||||
|
||||
progress "setup keyboard layout"
|
||||
|
||||
|
@ -20,6 +20,6 @@
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
if [ -f /storage/.cache/xkb/layout ] ; then
|
||||
cat /storage/.cache/xkb/layout
|
||||
if [ -f $CONFIG_CACHE/xkb/layout ] ; then
|
||||
cat $CONFIG_CACHE/xkb/layout
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user