From 8beb20649824b0bc50d953e11a6d49f01a76cace Mon Sep 17 00:00:00 2001 From: James Meyer Date: Tue, 8 Sep 2009 09:30:02 -0500 Subject: linhes-config: install_functions, account for multiple dns servers be removing all but the first. --- abs/core-testing/LinHES-config/install_functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abs/core-testing/LinHES-config/install_functions.sh b/abs/core-testing/LinHES-config/install_functions.sh index 72023bd..4df2e8c 100755 --- a/abs/core-testing/LinHES-config/install_functions.sh +++ b/abs/core-testing/LinHES-config/install_functions.sh @@ -296,7 +296,7 @@ function request_dhcp(){ update_db_settings HostNETMASK$ndev "$TEMPVAR" TEMPVAR=`grep new_routers /tmp/dhcpinfo.$ndev |cut -d\= -f2` update_db_settings HostGW$ndev "$TEMPVAR" - TEMPVAR=`grep new_domain_name_servers /tmp/dhcpinfo.$ndev |cut -d\= -f2` + TEMPVAR=`grep new_domain_name_servers /tmp/dhcpinfo.$ndev |cut -d\= -f2| tr -d\"|tr -d\'|cut -d" " -f 1` update_db_settings HostDNS$ndev "$TEMPVAR" fi fi -- cgit v0.12 From 065ac482f15d766fea7a2a8cd5e763d642ca3a9a Mon Sep 17 00:00:00 2001 From: James Meyer Date: Tue, 8 Sep 2009 10:36:58 -0500 Subject: linhes-config: send mysql errors to /dev/null ref FS#505 --- abs/core-testing/LinHES-config/PKGBUILD | 2 +- abs/core-testing/LinHES-config/install_functions.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/abs/core-testing/LinHES-config/PKGBUILD b/abs/core-testing/LinHES-config/PKGBUILD index 4d01bbe..bc36fc0 100644 --- a/abs/core-testing/LinHES-config/PKGBUILD +++ b/abs/core-testing/LinHES-config/PKGBUILD @@ -1,6 +1,6 @@ pkgname=LinHES-config pkgver=2.0 -pkgrel=91 +pkgrel=94 conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev ) pkgdesc="Install and configure your system" depends=(bc libstatgrab mysql-python expect curl dnsutils parted diff --git a/abs/core-testing/LinHES-config/install_functions.sh b/abs/core-testing/LinHES-config/install_functions.sh index 4df2e8c..83a2bed 100755 --- a/abs/core-testing/LinHES-config/install_functions.sh +++ b/abs/core-testing/LinHES-config/install_functions.sh @@ -16,8 +16,8 @@ found_remote=1 function update_db_settings () { printhl " setting database value $1 to $2 for $hostname" - $MYSQLCMD_C "delete from settings where value='${1}' and hostname=\"$hostname\";" - $MYSQLCMD_C "REPLACE INTO settings set value='${1}', data='${2}' , hostname=\"$hostname\";" + $MYSQLCMD_C "delete from settings where value='${1}' and hostname=\"$hostname\";" 2>/dev/null + $MYSQLCMD_C "REPLACE INTO settings set value='${1}', data='${2}' , hostname=\"$hostname\";" 2>/dev/null } function random_theme () { @@ -296,7 +296,7 @@ function request_dhcp(){ update_db_settings HostNETMASK$ndev "$TEMPVAR" TEMPVAR=`grep new_routers /tmp/dhcpinfo.$ndev |cut -d\= -f2` update_db_settings HostGW$ndev "$TEMPVAR" - TEMPVAR=`grep new_domain_name_servers /tmp/dhcpinfo.$ndev |cut -d\= -f2| tr -d\"|tr -d\'|cut -d" " -f 1` + TEMPVAR=`grep new_domain_name_servers /tmp/dhcpinfo.$ndev |cut -d\= -f2| tr -d \"|tr -d \'|cut -d" " -f 1` update_db_settings HostDNS$ndev "$TEMPVAR" fi fi -- cgit v0.12 From 95bfe5ff669cf3a9ab9b6791e49567b4be8dab03 Mon Sep 17 00:00:00 2001 From: James Meyer Date: Tue, 8 Sep 2009 15:14:05 -0500 Subject: linhes-config: catch the error when trying to create etcnet dir --- abs/core-testing/LinHES-config/PKGBUILD | 2 +- abs/core-testing/LinHES-config/mv_network.py | 5 ++++- abs/mv-core/MythVantage-config/install_functions.sh | 6 +++--- abs/mv-core/MythVantage-config/mv_network.py | 5 ++++- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/abs/core-testing/LinHES-config/PKGBUILD b/abs/core-testing/LinHES-config/PKGBUILD index bc36fc0..31b9ffb 100644 --- a/abs/core-testing/LinHES-config/PKGBUILD +++ b/abs/core-testing/LinHES-config/PKGBUILD @@ -1,6 +1,6 @@ pkgname=LinHES-config pkgver=2.0 -pkgrel=94 +pkgrel=96 conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev ) pkgdesc="Install and configure your system" depends=(bc libstatgrab mysql-python expect curl dnsutils parted diff --git a/abs/core-testing/LinHES-config/mv_network.py b/abs/core-testing/LinHES-config/mv_network.py index 3f8de3b..b80e4cc 100755 --- a/abs/core-testing/LinHES-config/mv_network.py +++ b/abs/core-testing/LinHES-config/mv_network.py @@ -263,7 +263,10 @@ def setup_interface(netdev,systemconfig): optionfile=etcnetdir+"/"+netdev+"/options" if not os.path.exists(optionfile): - os.makedirs(etcnetdir+"/"+netdev) + try: + os.makedirs(etcnetdir+"/"+netdev) + except: + pass mv_common.cp_and_log(systemconfig["TEMPLATES"]+"/etcnet/eth/options", optionfile) if netinfo["isactive"] == "1" : diff --git a/abs/mv-core/MythVantage-config/install_functions.sh b/abs/mv-core/MythVantage-config/install_functions.sh index 72023bd..83a2bed 100755 --- a/abs/mv-core/MythVantage-config/install_functions.sh +++ b/abs/mv-core/MythVantage-config/install_functions.sh @@ -16,8 +16,8 @@ found_remote=1 function update_db_settings () { printhl " setting database value $1 to $2 for $hostname" - $MYSQLCMD_C "delete from settings where value='${1}' and hostname=\"$hostname\";" - $MYSQLCMD_C "REPLACE INTO settings set value='${1}', data='${2}' , hostname=\"$hostname\";" + $MYSQLCMD_C "delete from settings where value='${1}' and hostname=\"$hostname\";" 2>/dev/null + $MYSQLCMD_C "REPLACE INTO settings set value='${1}', data='${2}' , hostname=\"$hostname\";" 2>/dev/null } function random_theme () { @@ -296,7 +296,7 @@ function request_dhcp(){ update_db_settings HostNETMASK$ndev "$TEMPVAR" TEMPVAR=`grep new_routers /tmp/dhcpinfo.$ndev |cut -d\= -f2` update_db_settings HostGW$ndev "$TEMPVAR" - TEMPVAR=`grep new_domain_name_servers /tmp/dhcpinfo.$ndev |cut -d\= -f2` + TEMPVAR=`grep new_domain_name_servers /tmp/dhcpinfo.$ndev |cut -d\= -f2| tr -d \"|tr -d \'|cut -d" " -f 1` update_db_settings HostDNS$ndev "$TEMPVAR" fi fi diff --git a/abs/mv-core/MythVantage-config/mv_network.py b/abs/mv-core/MythVantage-config/mv_network.py index 3f8de3b..b80e4cc 100755 --- a/abs/mv-core/MythVantage-config/mv_network.py +++ b/abs/mv-core/MythVantage-config/mv_network.py @@ -263,7 +263,10 @@ def setup_interface(netdev,systemconfig): optionfile=etcnetdir+"/"+netdev+"/options" if not os.path.exists(optionfile): - os.makedirs(etcnetdir+"/"+netdev) + try: + os.makedirs(etcnetdir+"/"+netdev) + except: + pass mv_common.cp_and_log(systemconfig["TEMPLATES"]+"/etcnet/eth/options", optionfile) if netinfo["isactive"] == "1" : -- cgit v0.12 From 6b53e00c3f25bee6babd8e11ff6e846ad3f2107d Mon Sep 17 00:00:00 2001 From: James Meyer Date: Tue, 8 Sep 2009 15:19:07 -0500 Subject: etcnet: remove options file from pkg. post-install: on upgrade and backup options file exisits recreate the network interface. closes FS#482 --- abs/core-testing/etcnet/PKGBUILD | 6 +++--- abs/core-testing/etcnet/etcnet.install | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/abs/core-testing/etcnet/PKGBUILD b/abs/core-testing/etcnet/PKGBUILD index 3940da3..e9ac4f4 100755 --- a/abs/core-testing/etcnet/PKGBUILD +++ b/abs/core-testing/etcnet/PKGBUILD @@ -1,13 +1,13 @@ pkgname=etcnet pkgver=0.9.8 -pkgrel=7 +pkgrel=13 pkgdesc="/etc/net network configuration subsystem" url="http://etcnet.org/" depends=('bash' 'grep' 'sed' 'iproute2' 'wireless_tools' 'iptables' 'dhcpcd') arch=i686 install=etcnet.install source=(http://etcnet.org/files/$pkgname-$pkgver.tar.gz 10-defaults network functions.patch options ipv4route ipv4address ) -backup=(etc/net/ifaces/eth0/options etc/net/ifaces/eth0/ipv4route etc/net/ifaces/eth0/ipv4address) +#backup=(etc/net/ifaces/eth0/options etc/net/ifaces/eth0/ipv4route etc/net/ifaces/eth0/ipv4address) build() { cd $startdir/src/$pkgname-$pkgver @@ -23,7 +23,7 @@ build() { #setup default for eth0 mkdir -p $startdir/pkg/etc/net/ifaces/eth0 - cp $startdir/src/options $startdir/pkg/etc/net/ifaces/eth0/options +# cp $startdir/src/options $startdir/pkg/etc/net/ifaces/eth0/options # cp $startdir/src/ipv4route $startdir/pkg/etc/net/ifaces/eth0/ipv4route # cp $startdir/src/ipv4address $startdir/pkg/etc/net/ifaces/eth0/ipv4address diff --git a/abs/core-testing/etcnet/etcnet.install b/abs/core-testing/etcnet/etcnet.install index a8b8b17..f34629f 100755 --- a/abs/core-testing/etcnet/etcnet.install +++ b/abs/core-testing/etcnet/etcnet.install @@ -30,7 +30,11 @@ pre_upgrade() { # arg 1: the new package version # arg 2: the old package version post_upgrade() { - /bin/true + if [ -f /etc/net/ifaces/eth0/options.pacsave ] + then + systemconfig.py -m network + mv /etc/net/ifaces/eth0/options.pacsave /etc/net/ifaces/eth0/options.pacsave.orig + fi } # arg 1: the old package version -- cgit v0.12 From 8803ed24d1d1ea6720b0e7fa38e849d2f3a45123 Mon Sep 17 00:00:00 2001 From: James Meyer Date: Tue, 8 Sep 2009 17:10:43 -0500 Subject: runit-scripts: remove -p option from nfsd line. This -p was changing the port instead of giving the number of threads --- abs/core-testing/runit-scripts/PKGBUILD | 2 +- abs/core-testing/runit-scripts/runitscripts/services/nfsd/run | 2 +- abs/mv-core/runit-scripts-mv/runitscripts/services/nfsd/run | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/abs/core-testing/runit-scripts/PKGBUILD b/abs/core-testing/runit-scripts/PKGBUILD index 6bea389..1615994 100755 --- a/abs/core-testing/runit-scripts/PKGBUILD +++ b/abs/core-testing/runit-scripts/PKGBUILD @@ -1,6 +1,6 @@ pkgname=runit-scripts pkgver=1.8.0 -pkgrel=94 +pkgrel=95 pkgdesc="collection of startup scripts for runit" url="http://smarden.org/runit/" license="BSD" diff --git a/abs/core-testing/runit-scripts/runitscripts/services/nfsd/run b/abs/core-testing/runit-scripts/runitscripts/services/nfsd/run index 3b63077..207d7cd 100755 --- a/abs/core-testing/runit-scripts/runitscripts/services/nfsd/run +++ b/abs/core-testing/runit-scripts/runitscripts/services/nfsd/run @@ -16,7 +16,7 @@ source /etc/conf.d/nfs # start some nfsd threads printhl " Using ${NFSD_OPTS} " -/usr/sbin/rpc.nfsd -p ${NFSD_OPTS} >/dev/null 2>/dev/null +/usr/sbin/rpc.nfsd ${NFSD_OPTS} >/dev/null 2>/dev/null # since we are running kernel 2.6 we should also # mount the nfsd virtual filesystem diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/nfsd/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/nfsd/run index 3b63077..9665066 100755 --- a/abs/mv-core/runit-scripts-mv/runitscripts/services/nfsd/run +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/nfsd/run @@ -16,7 +16,7 @@ source /etc/conf.d/nfs # start some nfsd threads printhl " Using ${NFSD_OPTS} " -/usr/sbin/rpc.nfsd -p ${NFSD_OPTS} >/dev/null 2>/dev/null +/usr/sbin/rpc.nfsd ${NFSD_OPTS} >/dev/null 2>/dev/null # since we are running kernel 2.6 we should also # mount the nfsd virtual filesystem -- cgit v0.12 From a22d235cd404f34ea89928c3bbda656a59e270e0 Mon Sep 17 00:00:00 2001 From: James Meyer Date: Tue, 8 Sep 2009 17:11:01 -0500 Subject: initscripts: ALWAYS run netfs on shutdown --- abs/core-testing/initscripts/PKGBUILD | 2 +- abs/core-testing/initscripts/rc.shutdown.patch | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/abs/core-testing/initscripts/PKGBUILD b/abs/core-testing/initscripts/PKGBUILD index c568c38..7f886e0 100644 --- a/abs/core-testing/initscripts/PKGBUILD +++ b/abs/core-testing/initscripts/PKGBUILD @@ -4,7 +4,7 @@ pkgname=initscripts pkgver=2009.01 -pkgrel=7 +pkgrel=9 pkgdesc="System initialization/bootup scripts" arch=('i686' 'x86_64') url="http://www.archlinux.org" diff --git a/abs/core-testing/initscripts/rc.shutdown.patch b/abs/core-testing/initscripts/rc.shutdown.patch index 187d1b7..7456b54 100644 --- a/abs/core-testing/initscripts/rc.shutdown.patch +++ b/abs/core-testing/initscripts/rc.shutdown.patch @@ -5,10 +5,10 @@ fi +#unmount network filesystems for runit -+if [ -e /var/service/netfs ] -+then ++#if [ -e /var/service/netfs ] ++#then + /etc/rc.d/netfs stop -+fi ++#fi + if [ "$PREVLEVEL" = "3" -o "$PREVLEVEL" = "5" ]; then # Shutdown daemons -- cgit v0.12 From f336bff553315d434c6b20b535d89f87edf039ee Mon Sep 17 00:00:00 2001 From: James Meyer Date: Tue, 8 Sep 2009 17:11:20 -0500 Subject: linhes-config: stop a service before removing it. --- abs/core-testing/LinHES-config/PKGBUILD | 2 +- abs/core-testing/LinHES-config/mv_common.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/abs/core-testing/LinHES-config/PKGBUILD b/abs/core-testing/LinHES-config/PKGBUILD index 31b9ffb..0690ade 100644 --- a/abs/core-testing/LinHES-config/PKGBUILD +++ b/abs/core-testing/LinHES-config/PKGBUILD @@ -1,6 +1,6 @@ pkgname=LinHES-config pkgver=2.0 -pkgrel=96 +pkgrel=97 conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev ) pkgdesc="Install and configure your system" depends=(bc libstatgrab mysql-python expect curl dnsutils parted diff --git a/abs/core-testing/LinHES-config/mv_common.py b/abs/core-testing/LinHES-config/mv_common.py index f18e02b..a492597 100755 --- a/abs/core-testing/LinHES-config/mv_common.py +++ b/abs/core-testing/LinHES-config/mv_common.py @@ -44,6 +44,7 @@ def add_service(daemon): def remove_service(daemon): logging.info(" Removing service %s",daemon) + stop_service(daemon) cmd = "remove_service.sh %s" %daemon runcmd(cmd) -- cgit v0.12 From 13b5221b802174391f7d9c7da28785520283deec Mon Sep 17 00:00:00 2001 From: James Meyer Date: Tue, 8 Sep 2009 17:11:45 -0500 Subject: mv-config: stop service before removing it. --- abs/mv-core/MythVantage-config/mv_common.py | 1 + 1 file changed, 1 insertion(+) diff --git a/abs/mv-core/MythVantage-config/mv_common.py b/abs/mv-core/MythVantage-config/mv_common.py index f18e02b..a492597 100755 --- a/abs/mv-core/MythVantage-config/mv_common.py +++ b/abs/mv-core/MythVantage-config/mv_common.py @@ -44,6 +44,7 @@ def add_service(daemon): def remove_service(daemon): logging.info(" Removing service %s",daemon) + stop_service(daemon) cmd = "remove_service.sh %s" %daemon runcmd(cmd) -- cgit v0.12