summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config
diff options
context:
space:
mode:
authorCecil <knoppmyth@gmail.com>2012-05-14 01:38:13 (GMT)
committerCecil <knoppmyth@gmail.com>2012-05-14 01:38:13 (GMT)
commit6fa6efd0975ac9e669ee73fe009c25fe739ac017 (patch)
treeb4e1cdb3e3001a1209fe932b2e26db33b0ed9120 /abs/core/LinHES-config
parente465b073524b59ea2b795d525cf39675857cf2ee (diff)
parentc04f2dfff3a4abbe0e3b4a7247f0001f797b07ac (diff)
downloadlinhes_pkgbuild-6fa6efd0975ac9e669ee73fe009c25fe739ac017.zip
linhes_pkgbuild-6fa6efd0975ac9e669ee73fe009c25fe739ac017.tar.gz
linhes_pkgbuild-6fa6efd0975ac9e669ee73fe009c25fe739ac017.tar.bz2
Merge branch 'testing' of git@linhes.org:linhes_pkgbuild into testing
Diffstat (limited to 'abs/core/LinHES-config')
-rw-r--r--abs/core/LinHES-config/PKGBUILD10
-rwxr-xr-xabs/core/LinHES-config/install_functions.sh8
-rwxr-xr-xabs/core/LinHES-config/install_proxy.sh11
-rwxr-xr-xabs/core/LinHES-config/mv_advanced.py66
-rw-r--r--abs/core/LinHES-config/myth_settings_wrapper.sh4
5 files changed, 70 insertions, 29 deletions
diff --git a/abs/core/LinHES-config/PKGBUILD b/abs/core/LinHES-config/PKGBUILD
index ad8b9b6..d30fc63 100644
--- a/abs/core/LinHES-config/PKGBUILD
+++ b/abs/core/LinHES-config/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=LinHES-config
pkgver=2.3
-pkgrel=71
+pkgrel=76
conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev LinHes-config )
pkgdesc="Install and configure your system"
depends=('bc' 'libstatgrab' 'mysql-python' 'expect' 'curl' 'dnsutils' 'parted'
@@ -109,12 +109,12 @@ md5sums=('18af4fe481e1fc2ae02050026eb5cd27'
'16b98fcb3753ef6cfc35075c326d30e4'
'e36da536dd651ef182e7642337889e77'
'985891a43f7c4c983eb2a362162f1a0f'
- '2f0b85d37b15956b3d92419c886e040c'
- '5b41574597ac5096fe3462afeb0376e4'
+ '3f5693c76c7e483dd3c2184bc2546c82'
+ '5a31addfbdc1154b05997f972a32fa33'
'c20f73d4da5d7e15e1f3eb85c7dcb49a'
'68199e861c2933ccbb84735b9b440157'
'9ae8d79f620c6d19973c55c32a921874'
- '6aea8876ab690e0edf817fe6cb5b7abc'
+ '79579277e0545aeeb50fba403434194c'
'960017a34d9cc78af6298f45aad6eb8e'
'ecf9e5df20683a769c4a8a8f2d65de85'
'6d32a88e76b0a97b0ce67d37ef6394aa'
@@ -127,7 +127,7 @@ md5sums=('18af4fe481e1fc2ae02050026eb5cd27'
'9151c74fcaf18ec4cf5e757cfdbc7017'
'3d1e4a119f38cff0498bf8a67e94e4b3'
'71fd2d0d448fc2fcd15415a1beed7109'
- '5f3259afe031fda189edae41dd1458f0'
+ 'b83072f08725f1216a4d31e02d60c5e5'
'e1715bbbabd42e7419755b09f60734aa'
'b845de3e05c1734cce4b9ac5e8f1baaf'
'6801f87992b44118a12b6dfe6ea68127'
diff --git a/abs/core/LinHES-config/install_functions.sh b/abs/core/LinHES-config/install_functions.sh
index c807f15..08206fc 100755
--- a/abs/core/LinHES-config/install_functions.sh
+++ b/abs/core/LinHES-config/install_functions.sh
@@ -315,6 +315,11 @@ function in_kernel_support() {
#For disabling other protocols, adjust to the new location in 2.6.37. 91
if [ -d /sys/class/rc ] && [ "$(ls -A /sys/class/rc)" ]
then
+ LCDDSTOP=0
+ if [ -d /service/lcdd ]; then
+ sv stop lcdd
+ LCDDSTOP=1
+ fi
for file in `find /sys/class/rc/*/ -name protocols`
do
if [ "$1" = "disable" ]
@@ -327,6 +332,9 @@ function in_kernel_support() {
done
fi
done
+ if [ $LCDDSTOP -eq 1 ]; then
+ sv start lcdd
+ fi
fi
}
diff --git a/abs/core/LinHES-config/install_proxy.sh b/abs/core/LinHES-config/install_proxy.sh
index 4bb2444..2449874 100755
--- a/abs/core/LinHES-config/install_proxy.sh
+++ b/abs/core/LinHES-config/install_proxy.sh
@@ -119,6 +119,7 @@ case $1 in
echo " network check nameserver"
mydns=`cat /etc/resolv.conf|grep nameserver|head -1|awk '{ print $2}'`
ping -c 1 $mydns
+ echo " DNS server is $mydns"
if [ ! $? = 0 ]
then
exit 5
@@ -170,14 +171,18 @@ case $1 in
echo "Assuming hostname is OK"
echo "DNS unknown: $unkownhostip"
echo " HOSTDNS: $hoip "
+ echo " HOST: "
/sbin/ifconfig -a |grep "inet addr"
+ status=0
else
echo "IP in DNS but doesn't match mine, hostname is not safe to use"
- echo "DNS:$hoip"
- echo "HOST: "
+ echo " hout: $hout"
+ echo " DNS unknown: $unkownhostip"
+ echo " DNS IP:$hoip"
+ echo " HOST: "
/sbin/ifconfig -a |grep "inet addr"
status=7
- fi
+ fi
fi
else
echo "Couldn't find hostname in DNS, must be safe to use"
diff --git a/abs/core/LinHES-config/mv_advanced.py b/abs/core/LinHES-config/mv_advanced.py
index dd00f1d..7608604 100755
--- a/abs/core/LinHES-config/mv_advanced.py
+++ b/abs/core/LinHES-config/mv_advanced.py
@@ -34,28 +34,53 @@ def setup_pacman(create_link):
else:
logging.info(" Pacman link will not be created")
return
-
-def setup_ncid_client(dbhost,templatefile):
- #This always runs
- logging.debug(" Configuring ncid client with server %s",dbhost)
- cmd = '''sed -e "s/^set Host.*$/set Host %s /" %s >/etc/ncid/ncid.conf''' %(dbhost, templatefile)
+def setup_ncid_client(runclient):
+ logging.debug(" Configuring ncid client")
+ if runclient == "1" :
+ mv_common.pacinstall("ncid")
+ mv_common.add_service("ncid-client")
+ else:
+ logging.debug(" Removing ncid client")
+ mv_common.remove_service("ncid-client")
return
-def setup_ncid_daemon(port,templatefile,Runncidd):
+def setup_ncid_daemon(Runncidd):
logging.info(" Configuring callerid daemon")
if Runncidd == "1":
- logging.debug(" Port: %s",port)
- mv_common.cp_and_log("/etc/ncid/ncidd.conf",templatefile)
- cmd = '''sed -e "s/.*set ttyport.*$/set ttyport = \/dev\/%s /" %s >/etc/ncid/ncidd.conf''' %(port,templatefile)
- mv_common.runcmd(cmd)
- mv_common.pacinstall("ncidd")
- mv_common.add_service("ncidd")
+ mv_common.pacinstall("ncid")
+ mv_common.add_service("ncid-server")
+ mv_common.add_service("ncid-logger")
else:
logging.debug(" Callerid will not run")
- mv_common.pacremove("ncidd")
- mv_common.remove_service("ncidd")
+ mv_common.pacremove("ncid")
+ mv_common.remove_service("ncid-server")
+ mv_common.remove_service("ncid-logger")
+
return
+
+
+#def setup_ncid_client(dbhost,templatefile):
+ ##This always runs
+ #logging.debug(" Configuring ncid client with server %s",dbhost)
+ #cmd = '''sed -e "s/^set Host.*$/set Host %s /" %s >/etc/ncid/ncid.conf''' %(dbhost, templatefile)
+ #return
+
+#def setup_ncid_daemon(port,templatefile,Runncidd):
+ #logging.info(" Configuring callerid daemon")
+ #if Runncidd == "1":
+ #logging.debug(" Port: %s",port)
+ #mv_common.cp_and_log("/etc/ncid/ncidd.conf",templatefile)
+ #cmd = '''sed -e "s/.*set ttyport.*$/set ttyport = \/dev\/%s /" %s >/etc/ncid/ncidd.conf''' %(port,templatefile)
+ #mv_common.runcmd(cmd)
+ #mv_common.pacinstall("ncidd")
+ #mv_common.add_service("ncidd")
+ #else:
+ #logging.debug(" Callerid will not run")
+ #mv_common.pacremove("ncidd")
+ #mv_common.remove_service("ncidd")
+ #return
+
def setup_splash(Usebootsplash):
if Usebootsplash == "1":
logging.info(" Enabling splash")
@@ -359,12 +384,15 @@ def setup_advanced(systemconfig,data_config):
if systemconfig.get("SystemType") == "Master_backend":
create_link = True
setup_pacman(create_link)
- setup_ncid_client(systemconfig.get("dbhost"),
- systemconfig.get("TEMPLATES")+"/ncid.conf.template")
- setup_ncid_daemon(systemconfig.get("nciddSerialPort"),
- systemconfig.get("TEMPLATES")+"/ncidd.conf.template",
- systemconfig.get("Runncidd"))
+ setup_ncid_client(systemconfig.get("ncidclient"))
+ setup_ncid_daemon(systemconfig.get("Runncidd"))
+ #setup_ncid_client(systemconfig.get("dbhost"),
+ #systemconfig.get("TEMPLATES")+"/ncid.conf.template")
+
+ #setup_ncid_daemon(systemconfig.get("nciddSerialPort"),
+ #systemconfig.get("TEMPLATES")+"/ncidd.conf.template",
+ #systemconfig.get("Runncidd"))
setup_splash(systemconfig.get("Usebootsplash"))
if data_config.SYSTEMTYPE == "MythVantage":
diff --git a/abs/core/LinHES-config/myth_settings_wrapper.sh b/abs/core/LinHES-config/myth_settings_wrapper.sh
index bcba9d1..33f401f 100644
--- a/abs/core/LinHES-config/myth_settings_wrapper.sh
+++ b/abs/core/LinHES-config/myth_settings_wrapper.sh
@@ -233,14 +233,14 @@ case $OPERATION in
for i in $LIST
do
- define_xml 1 $i settings $hostname
+ define_xml 1 $hostname settings $i
load_xml $gen_xml
done
LIST="HostaccesshostypeSystemtype Hostaccessuser"
for i in $LIST
do
- define_xml 0 $i settings $hostname
+ define_xml 0 $hostname settings $i
load_xml $gen_xml
done
;;