diff options
author | James Meyer <james.meyer@operamail.com> | 2009-06-01 20:23:30 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2009-06-01 20:23:30 (GMT) |
commit | d9d928e1890f4c841889d2362b988466b85904cd (patch) | |
tree | 5420888b79b71400db0f89fac2786802fadefb3b /abs/core-testing/LinHES-config/mv_misc.py | |
parent | af488dcf5c3d0354003910b3af841827980250a8 (diff) | |
download | linhes_pkgbuild-d9d928e1890f4c841889d2362b988466b85904cd.zip linhes_pkgbuild-d9d928e1890f4c841889d2362b988466b85904cd.tar.gz linhes_pkgbuild-d9d928e1890f4c841889d2362b988466b85904cd.tar.bz2 |
LinHES-config: cleanup
Diffstat (limited to 'abs/core-testing/LinHES-config/mv_misc.py')
-rw-r--r-- | abs/core-testing/LinHES-config/mv_misc.py | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/abs/core-testing/LinHES-config/mv_misc.py b/abs/core-testing/LinHES-config/mv_misc.py index e792f67..eba7b57 100644 --- a/abs/core-testing/LinHES-config/mv_misc.py +++ b/abs/core-testing/LinHES-config/mv_misc.py @@ -11,15 +11,18 @@ def setup_zip(MVROOT,zipcode): if zipcode: cmd="%s/bin/restore_default_settings.sh -c ZIP -c %s" %(MVROOT,zipcode) + mv_common.runcmd(cmd) #Let's also speed things up for those in North America - #LOOK REVISIT - print "mkdir /usr/bin/perlbin/vendor/tv_grabbers_non_na" - print "mv /usr/bin/perlbin/vendor/tv_grab_* /usr/bin/perlbin/vendor/tv_grabbers_non_na" - print "mv /usr/bin/perlbin/vendor/tv_grabbers_non_na/tv_grab_na* /usr/bin/perlbin/vendor/" + cmd="mkdir /usr/bin/perlbin/vendor/tv_grabbers_non_na" + mv_common.runcmd(cmd) + cmd="mv /usr/bin/perlbin/vendor/tv_grab_* /usr/bin/perlbin/vendor/tv_grabbers_non_na" + mv_common.runcmd(cmd) + cmd="mv /usr/bin/perlbin/vendor/tv_grabbers_non_na/tv_grab_na* /usr/bin/perlbin/vendor/" + mv_common.runcmd(cmd) else: logging.debug(" Zipcode is not set") - logging.debug("__End of zipcode") + logging.debug("__End of zipcode\n") def setup_tz(timezone,TEMPLATES): logging.debug("____Setting up the timezone____") @@ -37,22 +40,24 @@ def setup_tz(timezone,TEMPLATES): srclink="/usr/share/zoneinfo/%s" %timezone logging.debug(" symlinking %s to /etc/localtime",srclink) os.symlink(srclink,"/etc/localtime") - print '''sed -e "s~^TIMEZONE=.*$~TIMEZONE=\"${timezone}\"~" ${BASE}/etc/rc.conf > $TEMPLATES/rc.conf''' + cmd = '''sed -e "s~^TIMEZONE=.*$~TIMEZONE=\"%s\"~" /etc/rc.conf > $TEMPLATES/rc.conf''' %timezone + mv_common.runcmd(cmd) if os.path.exists("/etc/php/php.ini"): logging.debug("Changing timezone for php") - print '''sed -i "s/^.*date.timezone.*$/date.timezone=${timezone}/" ${BASE}/etc/php/php.ini''' + cmd = '''sed -i "s/^.*date.timezone.*$/date.timezone=%s/" ${BASE}/etc/php/php.ini''' %timezone + mv_common.runcmd(cmd) mv_common.cp_and_log(TEMPLATES+"/rc.conf","/etc/rc.conf") - logging.debug("__End of timezone") + logging.debug("__End of timezone\n") def setup_nfs(systemconfig): nfslist=[] - logging.debug("____Setting up nfs____") + logging.info("____Start of setup_nfs____") scrubnfs(systemconfig["TEMPLATES"]) if systemconfig["HaveCentralNFS"] == "yes": - logging.debug(" Using a Central NFS server") + logging.debug(" Using a Central NFS server") if systemconfig["NFSserver"] == "file:nfsmap": #if it's a file check for it, failure results in downloading attempt from MBE nfsmap_file=data_config.MYTHHOME+"/templates/nfsmap" @@ -72,7 +77,7 @@ def setup_nfs(systemconfig): nfslist.append(item) setup_nfs_fstab(nfslist) - logging.debug("__End of nfs") + logging.info("__End of nfs\n") def setup_sleep(systemconfig): logging.debug("____Setting up sleep____") @@ -98,7 +103,7 @@ def setup_sleep(systemconfig): cmd='''sed -e "/00 HOUR.*/d" %s/cron.template | crontab - -u mythtv''' %systemconfig["TEMPLATES"] mv_common.runcmd(cmd) - logging.debug("__End of sleep") + logging.debug("__End of sleep\n") def process_nfsmap_file(mapfile): @@ -149,7 +154,7 @@ def download_nfsmap(ip): return nfsmap_file def setup_nfs_fstab(nfslist): - logging.info(" Adding nfs paths to fstab") + logging.info(" Adding nfs paths to fstab") try: f = open('/etc/fstab', 'a') line = "#STARTSCRUB --------------anything in this block will be scrubbed\n" |