diff options
Diffstat (limited to 'abs')
-rw-r--r-- | abs/core/LinHES-config/PKGBUILD | 6 | ||||
-rwxr-xr-x | abs/core/LinHES-config/mv_hostype.py | 8 | ||||
-rwxr-xr-x | abs/core/LinHES-config/mv_network.py | 29 | ||||
-rw-r--r-- | abs/core/nss-mdns/PKGBUILD | 34 | ||||
-rw-r--r-- | abs/core/nss-mdns/mdns.allow | 8 | ||||
-rw-r--r-- | abs/core/nss-mdns/nss-mdns.install | 20 |
6 files changed, 98 insertions, 7 deletions
diff --git a/abs/core/LinHES-config/PKGBUILD b/abs/core/LinHES-config/PKGBUILD index da14839..cf5a630 100644 --- a/abs/core/LinHES-config/PKGBUILD +++ b/abs/core/LinHES-config/PKGBUILD @@ -1,6 +1,6 @@ pkgname=LinHES-config pkgver=2.3 -pkgrel=66 +pkgrel=68 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' @@ -130,12 +130,12 @@ md5sums=('18af4fe481e1fc2ae02050026eb5cd27' 'b845de3e05c1734cce4b9ac5e8f1baaf' '6801f87992b44118a12b6dfe6ea68127' '5e69839659d65ddda35b8a9982dc29e9' - '62b4ce94277c32f525db5c1480670acd' + '3afd18517bb765d1680f4fcc8d08c9cc' 'ec6a9961e4d1b53ec1240c5979efff11' 'fe5e31b833cc6707209e9d656b6eb53c' '76140f4160ebb1790a24f9b51b542a7b' '23d0e12b7ca1cc6ea6b993c1d7ff20b9' - 'bce31dc826812d1b32003f77f9945ca9' + '0b5b9e5385c7ae77e561812e96ce8161' '59dd4d49fd92a35f4111aa9b77fa21b6' '2596460462cf6c889cf8f95485537b20' 'a63ff9ef5250965aeabc74bfa8e43981') diff --git a/abs/core/LinHES-config/mv_hostype.py b/abs/core/LinHES-config/mv_hostype.py index 1396dfe..59b05b6 100755 --- a/abs/core/LinHES-config/mv_hostype.py +++ b/abs/core/LinHES-config/mv_hostype.py @@ -272,7 +272,7 @@ def hostypeprint(systemconfig): run_mysqlnetwork = True if systemconfig.get("hostypec"): setup_db() - install_list=["mysql", "mythdb-initial", "avahi", "rpcbind", "nfs-utils", "local-website", "myth2ipod", "mythtv-status"] + install_list=["nss-mdns", "mysql", "mythdb-initial", "avahi", "rpcbind", "nfs-utils", "local-website", "myth2ipod", "mythtv-status"] daemon_list=["mysql", "mythbackend", "avahi", "rpcbind", "nfs-common", "netfs", "lighttpd"] @@ -289,7 +289,7 @@ def hostypeprint(systemconfig): logging.info("Master backend system being configured") setup_ntp(False,"null") setup_avahi(systemconfig.get("TEMPLATES")) - install_list=["mysql", "mythdb-initial", "avahi", "rpcbind", "nfs-utils", "local-website", "myth2ipod", "mythtv-status"] + install_list=["nss-mdns", "mysql", "mythdb-initial", "avahi", "rpcbind", "nfs-utils", "local-website", "myth2ipod", "mythtv-status"] daemon_list=["mysql", "mythbackend", "avahi", "rpcbind", "nfs-common", "netfs", "lighttpd"] EnableNetwork = True run_mysqlnetwork = True @@ -312,7 +312,7 @@ def hostypeprint(systemconfig): if systemconfig.get("hostypec"): setup_db() - install_list = ["rpcbind", "nfs-utils", "avahi", "libmysqlclient" ] + install_list = [ "nss-mdns", "rpcbind", "nfs-utils", "avahi", "libmysqlclient" ] daemon_list = ["mythbackend", "rpcbind", "nfs-common", "netfs", "avahi" ] daemon_remove_list=["mysql", "lighttpd", "certmaster"] @@ -335,7 +335,7 @@ def hostypeprint(systemconfig): install_list=["mysql-clients", "libmysqlclient", "avahi", "rpcbind", "nfs-utils"] remove_list=["mysql","lighttpd"] - daemon_list=["mysql", "mythbackend", "avahi", "rpcbind", "nfs-common", "netfs" ] + daemon_list=["nss-mdns", "mysql", "mythbackend", "avahi", "rpcbind", "nfs-common", "netfs" ] daemon_remove_list=["mysql", "mythbackend","lighttpd"] if xymon_supported: install_list.append('xymonclient') diff --git a/abs/core/LinHES-config/mv_network.py b/abs/core/LinHES-config/mv_network.py index f25d4bc..aab1345 100755 --- a/abs/core/LinHES-config/mv_network.py +++ b/abs/core/LinHES-config/mv_network.py @@ -143,6 +143,13 @@ def kill_dhcp(basedir): def setup_nameserver(dns): logging.info(" Adding %s for DNS", dns) + lan="local" + cmd = '''grep -q %s /etc/resolv.conf''' %lan + status = mv_common.runcmd(cmd) + if not status == 0 : + cmd = ''' echo "search %s" >> /etc/resolv.conf ''' %lan + mv_common.runcmd(cmd) + cmd = '''grep -q %s /etc/resolv.conf''' %dns status = mv_common.runcmd(cmd) if not status == 0 : @@ -301,6 +308,15 @@ def setup_interface(netdev,systemconfig): logging.info(" Enabling DHCP support") cmd = ''' sed -i -e 's/^BOOTPROTO=.*$/BOOTPROTO=dhcp/g' %s/%s/options''' %(etcnetdir, netdev) mv_common.runcmd(cmd) + #add .local .lan + local="local" + cmd = '''grep -q %s /etc/resolv.conf.head''' %local + status = mv_common.runcmd(cmd) + if not status == 0 : + cmd = ''' echo "search %s" >> /etc/resolv.conf.head ''' %local + mv_common.runcmd(cmd) + + else: logging.info(" Using static ip address of %s",netinfo["ip"]) cmd = ''' sed -i -e 's/^BOOTPROTO=.*$/BOOTPROTO=static/g' %s/%s/options''' %(etcnetdir, netdev) @@ -384,6 +400,10 @@ def find_active(systemconfig,this_is_install): mv_common.remove_file("/etc/resolv.conf") cmd = ''' echo search lan > /etc/resolv.conf ''' mv_common.runcmd(cmd) + + cmd = ''' echo search local >> /etc/resolv.conf ''' + mv_common.runcmd(cmd) + cmd = ''' echo nameserver 127.0.0.1 >> /etc/resolv.conf ''' mv_common.runcmd(cmd) @@ -487,6 +507,9 @@ def setup_network (systemconfig,this_is_install): return False logging.info("____Start of network____") logging.info(" Setting up the network") + mv_common.pacinstall("nss-mdns") + mv_common.pacinstall("avahi") + setup_nsswitch() restartfe = hostname_change_check(systemconfig) setup_hostname(systemconfig) find_active(systemconfig,this_is_install) @@ -494,12 +517,18 @@ def setup_network (systemconfig,this_is_install): logging.info("__End of network\n") return restartfe +def setup_nsswitch(): + logging.info(" Adding mdns4 to nsswitch.conf") + cmd = '''sed -i "s/hosts:.*$/hosts: files mdns4_minimal dns mdns4/" /etc/nsswitch.conf''' + mv_common.runcmd(cmd) ##this is used by the install process to start the network def install_network_setup(systemconfig): logging.info("____Start of network_install____") logging.info(" Setting up the network") + + #setup_MYTH_vars setup_hostname(systemconfig) stop_network() diff --git a/abs/core/nss-mdns/PKGBUILD b/abs/core/nss-mdns/PKGBUILD new file mode 100644 index 0000000..643dac8 --- /dev/null +++ b/abs/core/nss-mdns/PKGBUILD @@ -0,0 +1,34 @@ +# $Id: PKGBUILD 124100 2011-05-16 15:17:50Z andrea $ +# Maintainer: +# Contributor: Travis Willard <travis@archlinux.org> + +pkgname=nss-mdns +pkgver=0.10 +pkgrel=3 +pkgdesc="glibc plugin providing host name resolution via mDNS" +arch=('i686' 'x86_64') +url="http://0pointer.de/lennart/projects/nss-mdns/" +license=('LGPL') +depends=('glibc') +makedepends=('pkgconfig') +backup=('etc/mdns.allow') +install=nss-mdns.install +source=("http://0pointer.de/lennart/projects/${pkgname}/${pkgname}-${pkgver}.tar.gz" + 'mdns.allow') +md5sums=('03938f17646efbb50aa70ba5f99f51d7' + '904abb492fb1f56722826c0c3a997bf0') + +build() { + cd "${srcdir}"/${pkgname}-${pkgver} + ./configure --prefix=/ \ + --disable-lynx \ + --enable-avahi + make +} + +package() { + cd "${srcdir}"/${pkgname}-${pkgver} + make DESTDIR="${pkgdir}" install + install -Dm644 "${srcdir}"/mdns.allow "${pkgdir}"/etc/mdns.allow +} + diff --git a/abs/core/nss-mdns/mdns.allow b/abs/core/nss-mdns/mdns.allow new file mode 100644 index 0000000..ed64c97 --- /dev/null +++ b/abs/core/nss-mdns/mdns.allow @@ -0,0 +1,8 @@ +# +# /etc/mdns.allow +# + +.local. +.local + +# End of file diff --git a/abs/core/nss-mdns/nss-mdns.install b/abs/core/nss-mdns/nss-mdns.install new file mode 100644 index 0000000..85e4d26 --- /dev/null +++ b/abs/core/nss-mdns/nss-mdns.install @@ -0,0 +1,20 @@ +post_install() { + cat << 'EOM' +==> To enable IPv4 multicast DNS lookups, append 'mdns4' to the hosts line + in /etc/nsswitch.conf. Use 'mdns6' for IPv6 or 'mdns' for both. +EOM +} + +post_upgrade() { + if [ "$2" == "0.7-1" ]; then + echo -n "disabling mdns lookups in /etc/nsswitch.conf... " + sed -i -e '/^hosts: / s/ mdns\([46]\)\?\>//g' etc/nsswitch.conf && echo "done." + fi + cat << 'EOM' +==> Please note that due to security reasons from version 0.9 on the + minimal mDNS stack included in nss-mdns (dubbed "legacy") is no + longer built - nss-mdns will not work unless Avahi is running. +EOM + + post_install +} |