diff options
author | lcapriotti <lcapriotti@svn> | 2010-11-29 16:29:35 +0000 |
---|---|---|
committer | lcapriotti <lcapriotti@svn> | 2010-11-29 16:29:35 +0000 |
commit | 241854b596f9c3a6351312a17db47ba19b316ba0 (patch) | |
tree | 2596f832a750592a6dff53e1bae4145fccb2c92d /tools | |
parent | 81ca83cca4a2725cae14f79e6d05b4f299724e6c (diff) |
proper initial commit
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@35519 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/XBMCLive/live.d/13-disableXBMCIPv6.sh | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/tools/XBMCLive/live.d/13-disableXBMCIPv6.sh b/tools/XBMCLive/live.d/13-disableXBMCIPv6.sh index 8fd3320d39..2b8ab9ed40 100755 --- a/tools/XBMCLive/live.d/13-disableXBMCIPv6.sh +++ b/tools/XBMCLive/live.d/13-disableXBMCIPv6.sh @@ -27,7 +27,7 @@ activationToken="doNotDisableIPv6InXBMC" # if strings are the same the token is NOT part of the parameters list # here we want to stop script if the token is NOT there -if [ "$xbmcParams" = "${xbmcParams%$activationToken*}" ] ; then +if [ "$xbmcParams" != "${xbmcParams%$activationToken*}" ] ; then exit fi @@ -47,16 +47,15 @@ if [ ! -f /home/$xbmcUser/.xbmc/userdata/advancedsettings.xml ] ; then </network> </advancedsettings> EOF - chown -R $xbmcUser:$xbmcUser /home/$xbmcUser/.xbmc + chown -R $xbmcUser:$xbmcUser /home/$xbmcUser/.xbmc +else + if grep -i -q disableipv6 /home/$xbmcUser/.xbmc/userdata/advancedsettings.xml ; then + sed -i 's#\(<disableipv6>\)[a-z]*\(</disableipv6>\)#\1'true'\2#g' /home/$xbmcUser/.xbmc/userdata/advancedsettings.xml else - if grep -i -q disableipv6 /home/$xbmcUser/.xbmc/userdata/advancedsettings.xml ; then - sed -i 's#\(<disableipv6>\)[a-z]*\(</disableipv6>\)#\1'true'\2#g' /home/$xbmcUser/.xbmc/userdata/advancedsettings.xml + if grep -i -q "<network>" /home/$xbmcUser/.xbmc/userdata/advancedsettings.xml ; then + sed -i -e 's%<network>%&\n<disableipv6>true</disableipv6>%' /home/$xbmcUser/.xbmc/userdata/advancedsettings.xml else - if grep -i -q "<network>" /home/$xbmcUser/.xbmc/userdata/advancedsettings.xml ; then - sed -i -e 's%<network>%&\n<disableipv6>true</disableipv6>%' /home/$xbmcUser/.xbmc/userdata/advancedsettings.xml - else - sed -i -e 's%<advancedsettings>%&\n<network>\n<disableipv6>true</disableipv6>\n</network>%' /home/$xbmcUser/.xbmc/userdata/advancedsettings.xml - fi + sed -i -e 's%<advancedsettings>%&\n<network>\n<disableipv6>true</disableipv6>\n</network>%' /home/$xbmcUser/.xbmc/userdata/advancedsettings.xml fi fi fi |