summaryrefslogtreecommitdiffstats
path: root/abs
diff options
context:
space:
mode:
Diffstat (limited to 'abs')
-rwxr-xr-xabs/core-testing/LinHES-config/PKGBUILD2
-rwxr-xr-xabs/core-testing/LinHES-config/xconfig.sh27
-rw-r--r--abs/core-testing/etcnet/10-defaults3
-rwxr-xr-xabs/core-testing/etcnet/PKGBUILD2
-rwxr-xr-xabs/mv-core/MythVantage-config/PKGBUILD2
-rwxr-xr-xabs/mv-core/MythVantage-config/install_proxy.sh6
-rw-r--r--abs/mv-core/MythVantage-system/PKGBUILD2
-rw-r--r--abs/mv-core/MythVantage-system/STB.install4
-rw-r--r--abs/mv-core/certmaster/PKGBUILD5
-rwxr-xr-xabs/mv-core/certmaster/certmaster.install46
-rw-r--r--abs/mv-core/func/PKGBUILD6
-rw-r--r--abs/mv-core/func/fe_restart.py35
-rwxr-xr-xabs/mv-core/func/func.install11
-rw-r--r--abs/mv-core/func/power.py8
-rwxr-xr-xabs/mv-core/hobbitmon/PKGBUILD2
-rwxr-xr-xabs/mv-core/hobbitmon/hbnotes.py2
-rwxr-xr-xabs/mv-core/local-website/PKGBUILD2
-rwxr-xr-xabs/mv-core/local-website/contents/process.py55
18 files changed, 161 insertions, 59 deletions
diff --git a/abs/core-testing/LinHES-config/PKGBUILD b/abs/core-testing/LinHES-config/PKGBUILD
index 11b1a55..cea9c1c 100755
--- a/abs/core-testing/LinHES-config/PKGBUILD
+++ b/abs/core-testing/LinHES-config/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=LinHES-config
pkgver=1.0
-pkgrel=286
+pkgrel=290
conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev )
pkgdesc="Install and configure your system"
depends=(bc libstatgrab mysql-python expect curl dnsutils parted sg3_utils nmbscan )
diff --git a/abs/core-testing/LinHES-config/xconfig.sh b/abs/core-testing/LinHES-config/xconfig.sh
index eaa84b6..e2a48ed 100755
--- a/abs/core-testing/LinHES-config/xconfig.sh
+++ b/abs/core-testing/LinHES-config/xconfig.sh
@@ -5,6 +5,7 @@ BASE=""
. /etc/profile
NVIDIA_96XX="$TEMPLATES/xorg/96xx_supported.txt"
#TEMPLATES="/usr/share/templates"
+MYTHHOME=$BASE/home/mythtv
function Xvalues {
CMDLINE=$(cat /proc/cmdline)
@@ -23,29 +24,31 @@ function Xvalues {
}
function presetupX {
- if [ "$XUseAdvanced" = 1 ]
+ if [ -f /etc/sysconfig/IGNORE_X ]
then
+ echo "Will not run xconfig.sh due to presence of /etc/sysconfig/IGNORE_X"
+ return 1
+ else
if [ "$XIgnoreConfig" = 1 ]
then
echo "Using User supplied X"
- if [ -f "$BASE/data/home/mythtv/templates/xorg.user" ]
+ if [ -f "$MYTHHOME/templates/xorg.user" ]
then
- cp -f "$BASE/data/home/mythtv/templates/xorg.user" "$XORG_CONF"
+ cp -f "$MYTHHOME/templates/xorg.user" "$XORG_CONF"
else
echo "Didn't find the file"
- echo "Copy your config file to $BASE/data/home/mythtv/templates/xorg.use" >> "$XORG_CONF"
+ echo "Copy your config file to $MYTHHOME/templates/xorg.user" > "$XORG_CONF"
fi
else
- setupAdvancedX
- fi
- else
- if [ -f /etc/sysconfig/IGNORE_X ]
- then
- echo "Will not run xconfig.sh due to presence of /etc/sysconfig/IGNORE_X"
- else
- setupX
+ if [ "$XUseAdvanced" = 1 ]
+ then
+ setupAdvancedX
+ else
+ setupX
+ fi
fi
fi
+
}
function setupAdvancedX {
diff --git a/abs/core-testing/etcnet/10-defaults b/abs/core-testing/etcnet/10-defaults
index 3eb9024..5897a89 100644
--- a/abs/core-testing/etcnet/10-defaults
+++ b/abs/core-testing/etcnet/10-defaults
@@ -1,6 +1,9 @@
DHCP_CLIENT=/sbin/dhcpcd
+DHCP_ARGS=-L
IP=/usr/sbin/ip
TC=/usr/sbin/tc
LSMOD=/bin/lsmod
IFGROUP[1]='eth wlan plip usb dvb bnep tuntap'
IFRENAME=/usr/sbin/ifrename
+IPTABLES=/usr/sbin/iptables
+IP6TABLES=/usr/sbin/ip6tables
diff --git a/abs/core-testing/etcnet/PKGBUILD b/abs/core-testing/etcnet/PKGBUILD
index bc69c83..39e1378 100755
--- a/abs/core-testing/etcnet/PKGBUILD
+++ b/abs/core-testing/etcnet/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=etcnet
pkgver=0.9.7
-pkgrel=9
+pkgrel=10
pkgdesc="/etc/net network configuration subsystem"
url="http://etcnet.org/"
depends=('bash' 'grep' 'sed' 'iproute' 'wireless_tools' 'iptables' 'dhcpcd')
diff --git a/abs/mv-core/MythVantage-config/PKGBUILD b/abs/mv-core/MythVantage-config/PKGBUILD
index 885e51d..d59299e 100755
--- a/abs/mv-core/MythVantage-config/PKGBUILD
+++ b/abs/mv-core/MythVantage-config/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=MythVantage-config
pkgver=3.2
-pkgrel=151
+pkgrel=152
pkgdesc="The Gui-installer"
depends=(bc mysql-python expect curl dnsutils sg3_utils parted)
arch=('i686')
diff --git a/abs/mv-core/MythVantage-config/install_proxy.sh b/abs/mv-core/MythVantage-config/install_proxy.sh
index d0be6c3..84b397e 100755
--- a/abs/mv-core/MythVantage-config/install_proxy.sh
+++ b/abs/mv-core/MythVantage-config/install_proxy.sh
@@ -106,7 +106,9 @@ full_install () {
cp -f $MV_ROOT/bin/*.sh "$mountpoint"$MV_ROOT/bin/
chmod -R 755 ${mountpoint}/root
cp /etc/mtab "$mountpoint"/etc/mtab
- apply_new_auth
+ apply_new_auth
+ mkdir -p $mountpoint/var/log/func
+ mkdir -p $mountpoint/var/log/certmaster
if [ $SystemType = "Master_backend" -o $SystemType = "Standalone" ]
then
@@ -222,6 +224,8 @@ function upgrade () {
chmod -R 755 ${mountpoint}/root
chown root:mythtv "$mountpoint"/etc/systemconfig
chmod 775 "$mountpoint"/etc/systemconfig
+ mkdir -p $mountpoint/var/log/func
+ mkdir -p $mountpoint/var/log/certmaster
#mount /proc and /dev
mount --bind /dev "$mountpoint/dev"
mount --bind /proc "$mountpoint/proc"
diff --git a/abs/mv-core/MythVantage-system/PKGBUILD b/abs/mv-core/MythVantage-system/PKGBUILD
index 12ba99e..d8b7315 100644
--- a/abs/mv-core/MythVantage-system/PKGBUILD
+++ b/abs/mv-core/MythVantage-system/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=MythVantage-system
pkgver=1.0
-pkgrel=4
+pkgrel=10
arch=('i686')
MVDIR=$startdir/pkg/usr/MythVantage
BINDIR=$startdir/pkg/usr/bin
diff --git a/abs/mv-core/MythVantage-system/STB.install b/abs/mv-core/MythVantage-system/STB.install
index 135663e..2dbfd19 100644
--- a/abs/mv-core/MythVantage-system/STB.install
+++ b/abs/mv-core/MythVantage-system/STB.install
@@ -39,8 +39,10 @@ LINE14="nobody ALL = NOPASSWD: /sbin/sv stop dnsmasq"
LINE15="nobody ALL = NOPASSWD: /sbin/sv start dnsmasq"
LINE16="nobody ALL = NOPASSWD: /sbin/sv hup dnsmasq"
LINE17="mythtv ALL =(ALL) NOPASSWD: ALL"
+LINE18="nobody ALL = NOPASSWD: /sbin/sv restart frontend"
+LINE19="nobody ALL = NOPASSWD: /usr/bin/killall -9 mythfrontend"
-for i in "$LINE" "$LINE1" "$LINE2" "$LINE3" "$LINE4" "$LINE5" "$LINE7" "$LINE8" "$LINE9" "$LINE10" "$LINE11" "$LINE12" "$LINE13" "$LINE14" "$LINE15" "$LINE16" "$LINE17"
+for i in "$LINE" "$LINE1" "$LINE2" "$LINE3" "$LINE4" "$LINE5" "$LINE7" "$LINE8" "$LINE9" "$LINE10" "$LINE11" "$LINE12" "$LINE13" "$LINE14" "$LINE15" "$LINE16" "$LINE17" "$LINE18" "$LINE19"
do
cp /etc/sudoers /etc/sudoers.bak
grep -q "$i" /etc/sudoers
diff --git a/abs/mv-core/certmaster/PKGBUILD b/abs/mv-core/certmaster/PKGBUILD
index 96b8d2c..8158bd7 100644
--- a/abs/mv-core/certmaster/PKGBUILD
+++ b/abs/mv-core/certmaster/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=certmaster
pkgver=0.24
-pkgrel=5
+pkgrel=6
pkgdesc="certmaster"
url=""
license="gpl"
@@ -8,11 +8,10 @@ depends=(pyopenssl)
makedepends=()
conflicts=()
replaces=()
-backup=()
moddir="pkg/usr/lib/python2.5/site-packages/func/minion/modules/"
backup=('etc/certmaster/certmaster.conf' 'etc/certmaster/minion.conf')
-
+install=certmaster.install
source=($pkgname-$pkgver.tar.gz certmaster.conf minion.conf)
md5sums=()
arch=('i686')
diff --git a/abs/mv-core/certmaster/certmaster.install b/abs/mv-core/certmaster/certmaster.install
new file mode 100755
index 0000000..98c9215
--- /dev/null
+++ b/abs/mv-core/certmaster/certmaster.install
@@ -0,0 +1,46 @@
+# This is a default template for a post-install scriptlet. You can
+# remove any functions you don't need (and this header).
+
+# arg 1: the new package version
+pre_install() {
+/bin/true
+mkdir -p /var/log/certmaster
+}
+
+# arg 1: the new package version
+post_install() {
+ if [ ! -e /var/log/certmaster ]
+ then
+ mkdir -p /var/log/certmaster
+ fi
+
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+pre_upgrade() {
+ /bin/true
+
+
+
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install
+}
+
+# arg 1: the old package version
+pre_remove() {
+ /bin/true
+}
+
+# arg 1: the old package version
+post_remove() {
+ /bin/true
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/mv-core/func/PKGBUILD b/abs/mv-core/func/PKGBUILD
index 9e4a598..5dc03d6 100644
--- a/abs/mv-core/func/PKGBUILD
+++ b/abs/mv-core/func/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=func
pkgver=0.24
-pkgrel=9
+pkgrel=22
pkgdesc="fedora unifed network controller"
url=""
license="gpl"
@@ -11,13 +11,12 @@ replaces=()
backup=()
moddir="pkg/usr/lib/python2.6/site-packages/func/minion/modules/"
install=func.install
-source=($pkgname-$pkgver.tar.gz minion.conf power.py pacman.py failed_func.sh)
+source=($pkgname-$pkgver.tar.gz minion.conf power.py pacman.py failed_func.sh fe_restart.py)
md5sums=()
arch=('i686')
build() {
cd $startdir/src/$pkgname-${pkgver}
- cd $startdir/src/func
python setup.py build
python setup.py install --prefix=$startdir/pkg/usr
cd $startdir/src
@@ -27,6 +26,7 @@ build() {
install -m755 -D $startdir/src/$pkgname-${pkgver}/etc/Test.conf $startdir/pkg/etc/func/modules/Test.conf
install -m755 -D $startdir/src/power.py ${startdir}/${moddir}/power.py
install -m755 -D $startdir/src/pacman.py ${startdir}/${moddir}/pacman.py
+ install -m755 -D $startdir/src/fe_restart.py ${startdir}/${moddir}/fe_restart.py
install -m755 -D $startdir/src/failed_func.sh $startdir/pkg/usr/bin/failed_func.sh
mkdir -p $startdir/pkg/var/log/func
cd $startdir/pkg
diff --git a/abs/mv-core/func/fe_restart.py b/abs/mv-core/func/fe_restart.py
new file mode 100644
index 0000000..a75b0c5
--- /dev/null
+++ b/abs/mv-core/func/fe_restart.py
@@ -0,0 +1,35 @@
+##
+# other modules
+import sub_process
+
+# our modules
+import func_module
+
+# =================================
+
+class re_restart(func_module.FuncModule):
+
+ version = "0.0.1"
+ api_version = "0.0.1"
+ description = "Restart the frontend"
+
+ def killX (self,flags="restart frontend"):
+ """
+ Restart X
+ """
+ flags.replace(";","") # prevent stupidity
+ cmd = sub_process.Popen("/sbin/sv %s " % flags,stdout=sub_process.PIPE,shell=True)
+ data = cmd.communicate()[0]
+ results = ['Restarted UI']
+ return (cmd.returncode, results)
+
+ def killmyth (self,flags="-9 mythfrontend"):
+ """
+ kill the mythfrontend process server
+ """
+ flags.replace(";","") # prevent stupidity
+ cmd = sub_process.Popen("/usr/bin/killall %s" % flags,stdout=sub_process.PIPE,shell=True)
+ data = cmd.communicate()[0]
+ results = ['killed mythfrontend']
+ return (cmd.returncode, results)
+
diff --git a/abs/mv-core/func/func.install b/abs/mv-core/func/func.install
index a1d42f8..5f0fa72 100755
--- a/abs/mv-core/func/func.install
+++ b/abs/mv-core/func/func.install
@@ -4,6 +4,7 @@
# arg 1: the new package version
pre_install() {
/bin/true
+mkdir -p /var/log/func
}
# arg 1: the new package version
@@ -12,9 +13,15 @@ post_install() {
then
mkdir /etc/cron.tenminutes
fi
+ if [ ! -e /etc/cron.tenminutes/failed_func.sh ]
+ then
+ ln -s /usr/bin/failed_func.sh /etc/cron.tenminutes/failed_func.sh
+ fi
- ln -s /usr/bin/failed_func.sh /etc/cron.tenminutes/failed_func.sh
-
+ if [ ! -e /var/log/func ]
+ then
+ mkdir -p /var/log/func
+ fi
}
diff --git a/abs/mv-core/func/power.py b/abs/mv-core/func/power.py
index 297f464..668965a 100644
--- a/abs/mv-core/func/power.py
+++ b/abs/mv-core/func/power.py
@@ -16,9 +16,9 @@ class power(func_module.FuncModule):
def reboot(self,flags="-q onecheck"):
"""
Reboot the server
- """
+ """
flags.replace(";","") # prevent stupidity
- cmd = sub_process.Popen("/sbin/reboot")
+ cmd = sub_process.Popen("/sbin/reboot")
data = cmd.communicate()[0]
results = ['reboot']
return (cmd.returncode, results)
@@ -26,9 +26,9 @@ class power(func_module.FuncModule):
def poweroff (self,flags="-q onecheck"):
"""
Reboot the server
- """
+ """
flags.replace(";","") # prevent stupidity
- cmd = sub_process.Popen("/sbin/poweroff")
+ cmd = sub_process.Popen("/sbin/poweroff")
data = cmd.communicate()[0]
results = ['off']
return (cmd.returncode, results)
diff --git a/abs/mv-core/hobbitmon/PKGBUILD b/abs/mv-core/hobbitmon/PKGBUILD
index e2a9484..cb71a60 100755
--- a/abs/mv-core/hobbitmon/PKGBUILD
+++ b/abs/mv-core/hobbitmon/PKGBUILD
@@ -1,7 +1,7 @@
pkgname=hobbitserver
provides=hobbit
pkgver=4.2.0
-pkgrel=102
+pkgrel=103
pkgdesc="Hobbit is a system for monitoring servers and networks. "
license="GPL"
arch=('i686')
diff --git a/abs/mv-core/hobbitmon/hbnotes.py b/abs/mv-core/hobbitmon/hbnotes.py
index 087b646..5300e88 100755
--- a/abs/mv-core/hobbitmon/hbnotes.py
+++ b/abs/mv-core/hobbitmon/hbnotes.py
@@ -297,7 +297,7 @@ def main(argv):
</select>
</br>
<input name="param2" type="radio" value="Kill" />Restart interface: </>
- <select name="param3">
+ <select name="param6">
<option value="killX">Full UI</option>
<option value="killmyth">MythFrontend</option>
</select>
diff --git a/abs/mv-core/local-website/PKGBUILD b/abs/mv-core/local-website/PKGBUILD
index 5ecee78..e0b2380 100755
--- a/abs/mv-core/local-website/PKGBUILD
+++ b/abs/mv-core/local-website/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=local-website
pkgver=3
-pkgrel=78
+pkgrel=85
pkgdesc="Local website for MythVantage "
arch=(i686 x86_64)
#depends=('lighttpd')
diff --git a/abs/mv-core/local-website/contents/process.py b/abs/mv-core/local-website/contents/process.py
index eb70caa..99404a4 100755
--- a/abs/mv-core/local-website/contents/process.py
+++ b/abs/mv-core/local-website/contents/process.py
@@ -40,32 +40,22 @@ def getform(theform, valuelist, notpresent='', nolist=False):
"""
data = {}
for field in valuelist:
-
-
if not theform.has_key(field):
# if the field is not present (or was empty)
data[field] = notpresent
-
else:
# the field is present
-
-
- print type(theform[field])
-
+ print type(theform[field])
if type(theform[field]) != type([]):
# is it a list or a single item
- print type(theform[field])
+ print type(theform[field])
data[field] = theform[field].value
-
else:
-
if not nolist:
# do we want a list ?
data[field] = theform.getlist(field)
-
else:
data[field] = theform.getfirst(field)
-
# just fetch the first item
return data
@@ -119,12 +109,8 @@ def go_backup(myhost):
cmd=' "sudo /etc/cron.daily/backup_cron ; sudo su nobody -c /data/srv/hobbit/server/ext/hbnotes.py"'
command=sshcmd + cmd + " 2>&1 "
results=os.popen(command,'r')
- #print command
-
-
return results
-
def go_restore(restorefile,myhost):
myhostname = socket.gethostname()
if myhostname.strip() == myhost.strip():
@@ -171,7 +157,7 @@ def go_updateall(allupdate_type):
cmd+=allupdate_type
command= cmd + " 2>&1 "
results=os.popen(command,'r')
- return results
+ return results
def go_shutdown(myhost):
@@ -216,16 +202,15 @@ def go_shutdownall():
def go_reboot(myhost):
myhostname = socket.gethostname()
if myhostname.strip() == myhost.strip():
- message="Reboot from MBE:::ALT"
- os.system("/usr/bin/osdClient.pl " + myhost.strip() + " 5000 " + "\"" + message + "\"" )
- time.sleep(3)
+ message="Reboot from MBE:::ALT"
+ os.system("/usr/bin/osdClient.pl " + myhost.strip() + " 5000 " + "\"" + message + "\"" )
+ time.sleep(3)
command="sudo /sbin/reboot "
else:
command="sudo /usr/bin/func \"" + myhost.strip() + "*\ call power reboot "
- message="Reboot from MBE:::ALT"
- os.system("/usr/bin/osdClient.pl " + myhost.strip() + " 5000 " + "\"" + message + "\"" )
- time.sleep(3)
-
+ message="Reboot from MBE:::ALT"
+ os.system("/usr/bin/osdClient.pl " + myhost.strip() + " 5000 " + "\"" + message + "\"" )
+ time.sleep(3)
results=os.popen(command,'r')
return results
@@ -234,6 +219,21 @@ def go_wake(myhost):
results=os.popen(command,'r')
return results
+def go_kill(myhost,kill_type):
+ myhostname = socket.gethostname()
+ if myhostname.strip() == myhost.strip():
+ if kill_type == "killX":
+ command="sudo /sbin/sv restart frontend"
+ else:
+ command="sudo /usr/bin/killall -9 mythfrontend"
+ else:
+ cmd=" call fe_restart "
+ cmd+=kill_type
+ command="sudo /usr/bin/func \"" + myhost.strip() + "*\" " + cmd
+ #print command
+ results=os.popen(command,'r')
+ return results
+
mainpage = '''
<html><head>
@@ -249,7 +249,7 @@ error = '''
result = '''
<h1>%s of %s</h1>
'''
-possible_parameters = ['param1', 'param2', 'param3', 'param4','hiddenparam','param5']
+possible_parameters = ['param1', 'param2', 'param3', 'param4','hiddenparam','param5','param6']
if __name__ == '__main__':
cgiprint(contentheader) # content header
@@ -270,7 +270,8 @@ if __name__ == '__main__':
update_type = formdict['param3']
oldurl = formdict['param4']
hidden = formdict['hiddenparam']
- all_update_type=formdict['param5']
+ all_update_type=formdict['param5']
+ kill_type = formdict['param6']
body = result % (radio, hidden)
@@ -298,6 +299,8 @@ if __name__ == '__main__':
mylogfile=go_updateall(all_update_type)
elif selection == "ShutdownAll":
mylogfile=go_shutdownall()
+ elif selection == "Kill":
+ mylogfile=go_kill(myhost,kill_type)
box='''
<div style="border: 1px solid #aaa; width:600px; height:500px; overflow:auto; color:#FFF;text-align:left;">