mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 23:13:13 +02:00
- data/control: remove some hardcoded paths
Conflicts: data/control/migration.sh.in Signed-off-by: Thilo Graf <dbt@novatux.de> Adopted only proforma.
This commit is contained in:
@@ -472,6 +472,11 @@ AC_CONFIG_FILES([
|
|||||||
src/nhttpd/nhttpd.conf
|
src/nhttpd/nhttpd.conf
|
||||||
])
|
])
|
||||||
|
|
||||||
|
## Migration script
|
||||||
|
#AC_CONFIG_FILES([
|
||||||
|
#data/control/migration.sh
|
||||||
|
#])
|
||||||
|
|
||||||
# Backup configs
|
# Backup configs
|
||||||
AC_CONFIG_FILES([
|
AC_CONFIG_FILES([
|
||||||
data/config/settingsupdate.conf
|
data/config/settingsupdate.conf
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
#EXTRA_DIST = \
|
||||||
|
# migration.sh migration.sh.in
|
||||||
|
|
||||||
installdir = $(CONTROLDIR)
|
installdir = $(CONTROLDIR)
|
||||||
|
|
||||||
install_SCRIPTS = \
|
install_SCRIPTS = \
|
||||||
|
65
data/control/migration.sh.in
Normal file
65
data/control/migration.sh.in
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
cd @CONFIGDIR@
|
||||||
|
if [ -e neutrino.conf ]; then
|
||||||
|
# remove NG leftovers
|
||||||
|
sed -i 's|ng_netfs_\(.*\)|netfs_\1|' neutrino.conf
|
||||||
|
|
||||||
|
# webradio_usr.xml was moved
|
||||||
|
sed -i "s|@CONFIGDIR@/webradio_usr.xml|@WEBRADIODIR_VAR@/webradio_usr.xml|" neutrino.conf
|
||||||
|
mkdir -p @WEBRADIODIR_VAR@/
|
||||||
|
if [ -e @CONFIGDIR@/webradio_usr.xml ]; then
|
||||||
|
mv @CONFIGDIR@/webradio_usr.xml @WEBRADIODIR_VAR@/
|
||||||
|
fi
|
||||||
|
|
||||||
|
# webtv_usr.xml was moved
|
||||||
|
sed -i "s|@CONFIGDIR@/webtv_usr.xml|@WEBTVDIR_VAR@/webtv_usr.xml|" neutrino.conf
|
||||||
|
mkdir -p @WEBTVDIR_VAR@/
|
||||||
|
if [ -e @CONFIGDIR@/webtv_usr.xml ]; then
|
||||||
|
mv @CONFIGDIR@/webtv_usr.xml @WEBTVDIR_VAR@/
|
||||||
|
fi
|
||||||
|
|
||||||
|
# remove all old glcd_ keywords; neutrino will add the new ones
|
||||||
|
if ! grep -q glcd_foreground_color neutrino.conf ; then
|
||||||
|
sed -i "/^glcd_/d" neutrino.conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
sort neutrino.conf > neutrino.sort
|
||||||
|
mv neutrino.sort neutrino.conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -e zapit/frontend.conf ]; then
|
||||||
|
# uni_qrg was renamed to uni_freq
|
||||||
|
sed -i "s|_uni_qrg=|_uni_freq=|g" @CONFIGDIR@/zapit/frontend.conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
controlscripts="\
|
||||||
|
audioplayer.start \
|
||||||
|
audioplayer.end \
|
||||||
|
deepstandby.on \
|
||||||
|
deepstandby.off \
|
||||||
|
inactivity.on \
|
||||||
|
movieplayer.start \
|
||||||
|
movieplayer.end \
|
||||||
|
neutrino.start \
|
||||||
|
pictureviewer.start \
|
||||||
|
pictureviewer.end \
|
||||||
|
recording.timer \
|
||||||
|
recording.start \
|
||||||
|
recording.end \
|
||||||
|
scan.start \
|
||||||
|
scan.stop \
|
||||||
|
standby.on \
|
||||||
|
standby.off \
|
||||||
|
"
|
||||||
|
|
||||||
|
mkdir -p @CONTROLDIR_VAR@/
|
||||||
|
for controlscript in $controlscripts; do
|
||||||
|
if [ -e $controlscript ]; then
|
||||||
|
mv $controlscript @CONTROLDIR_VAR@/
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# these control scripts hasn't counterparts in @CONTROLDIR_VAR@
|
||||||
|
rm -f migration.sh
|
||||||
|
rm -f flash.start
|
Reference in New Issue
Block a user