summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Frost <gregfrost1@bigpond.com>2010-01-15 21:30:29 (GMT)
committerGreg Frost <gregfrost1@bigpond.com>2010-01-15 21:30:29 (GMT)
commitbda57f4e83d8708bc7b4ac45e687a8c7d7ef2958 (patch)
treefd789540623073ef8d864b1d7e07d6c50c257f3b
parentb21c1c869c6c994d2fd35de2ec49b79d7f27ba44 (diff)
downloadlinhes_pkgbuild-bda57f4e83d8708bc7b4ac45e687a8c7d7ef2958.zip
linhes_pkgbuild-bda57f4e83d8708bc7b4ac45e687a8c7d7ef2958.tar.gz
linhes_pkgbuild-bda57f4e83d8708bc7b4ac45e687a8c7d7ef2958.tar.bz2
diskless-legacy: remove avahi on frontends. Provision for user specific tweak scripts
-rw-r--r--abs/core-testing/diskless-legacy/PKGBUILD2
-rwxr-xr-xabs/core-testing/diskless-legacy/config_diskless_frontend.bash49
2 files changed, 16 insertions, 35 deletions
diff --git a/abs/core-testing/diskless-legacy/PKGBUILD b/abs/core-testing/diskless-legacy/PKGBUILD
index cec0088..85cfc3a 100644
--- a/abs/core-testing/diskless-legacy/PKGBUILD
+++ b/abs/core-testing/diskless-legacy/PKGBUILD
@@ -2,7 +2,7 @@
# Maintainer: Greg Frost <gregfrost1@bigpond.com>
pkgname=diskless-legacy
pkgver=1
-pkgrel=2
+pkgrel=3
pkgdesc="Script for configuring a diskless mythtv frontends using NFS root."
arch=i686
depends=(tftp-hpa dhcp)
diff --git a/abs/core-testing/diskless-legacy/config_diskless_frontend.bash b/abs/core-testing/diskless-legacy/config_diskless_frontend.bash
index 73f2a1e..24d5fc1 100755
--- a/abs/core-testing/diskless-legacy/config_diskless_frontend.bash
+++ b/abs/core-testing/diskless-legacy/config_diskless_frontend.bash
@@ -3,21 +3,18 @@
# frontend can boot from it.
function backtitle() { # no arguments.
- BT="${0##*/}"
- KMV_F1='/KNOPPIX/KnoppMyth-version'
- KMV_F2='/etc/LinHES-release'
- if [ -f "$KMV_F1" ]; then
- BT="-= $(cat $KMV_F1) $BT =-"
- elif [ -f "$KMV_F2" ]; then
- BT="-= $(cat $KMV_F2) $BT =-"
- fi
+ BT="${0##*/}"
+ KMV='/etc/LinHES-release'
+ if [ -f "$KMV" ]; then
+ BT="-= $(cat $KMV) $BT =-"
+ fi
}
function must_be_root() { # no arguments.
- test $(id -u) == 0 && return
- MSG="\Z1ERROR\Zn: This script \Z4should\Zn be run by \Z1root\Zn."
- dialog --backtitle "$BT" --colors --msgbox "$MSG" 5 45
- exit 4
+ test $(id -u) == 0 && return
+ MSG="\Z1ERROR\Zn: This script \Z4should\Zn be run by \Z1root\Zn."
+ dialog --backtitle "$BT" --colors --msgbox "$MSG" 5 45
+ exit 4
}
backtitle
@@ -554,6 +551,7 @@ create_new_nfsroot() {
chroot $NFSROOT /sbin/remove_service.sh nmbd
chroot $NFSROOT /sbin/remove_service.sh smbd
chroot $NFSROOT /sbin/remove_service.sh tftpd
+ chroot $NFSROOT /sbin/remove_service.sh avahi
# Update the fstab.
@@ -606,29 +604,12 @@ $BACKEND_IP:${storage_mount} ${storage_mount} nfs auto,noatime,nolock,rsize=3276
chown mythtv:mythtv $NFSROOT/home/mythtv/.mythtv/mysql.txt
- # Personal tweak for the author:
-
- if [[ $NFSROOT = /nfsroot/fedell || \
- $NFSROOT = /nfsroot/feevo ]] ; then
-
- # Change the X resolution for the frontend.
-
- sed -i 's/^[[:space:]]*Modes.*$/\tModes "1440x900"/g' \
- $NFSROOT/etc/X11/xorg.conf
-
- # Swap to the legacy 96xx nvidia driver .
-
- chroot $NFSROOT mount /data/var/cache/pacman
- chroot $NFSROOT pacman --noconfirm -R nvidia vdpinfo
- chroot $NFSROOT pacman --noconfirm -Sf nvidia-96xx
- chroot $NFSROOT umount /data/var/cache/pacman
-
- # Change the remote to dvico.
-
- sed -i 's/mceusb/dvico/g' $NFSROOT/etc/systemconfig
- chroot $NFSROOT /usr/MythVantage/bin/systemconfig.sh ir
+ # Check if the user has a diskless_tweak.<frontend_name> file in root's
+ # home directory. If they do, run it inside the chroot of the NFS root.
- sed -i 's/UseMythWelcome="1"/UseMythWelcome="0"/g' $NFSROOT/etc/systemconfig
+ if [[ -x ~/diskless_tweak.$FRONTEND ]] ; then
+ echo Running tweak file ~/diskless_tweak.$FRONTEND
+ chroot $NFSROOT bash -v ~/diskless_tweak.$FRONTEND
fi
create_default_pxelinux_entry