summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-08-31 00:40:32 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-08-31 00:40:32 (GMT)
commitf8689644e72d7b4e191f222ef653d83b4306be39 (patch)
tree8e6f3d3fe63c8ccaf9c8b66346677958ffc828fc /abs/core/LinHES-config
parentad894491177cc6b401ee07dd58ddbfd1226811f9 (diff)
downloadlinhes_pkgbuild-f8689644e72d7b4e191f222ef653d83b4306be39.zip
linhes_pkgbuild-f8689644e72d7b4e191f222ef653d83b4306be39.tar.gz
linhes_pkgbuild-f8689644e72d7b4e191f222ef653d83b4306be39.tar.bz2
moved wmaker_data and e16_themes settings to /usr/share/wm_data.
This was done incase /data moves to it's own partition
Diffstat (limited to 'abs/core/LinHES-config')
-rwxr-xr-xabs/core/LinHES-config/PKGBUILD20
-rwxr-xr-xabs/core/LinHES-config/mv_install.py137
-rwxr-xr-xabs/core/LinHES-config/mv_vnc.py6
3 files changed, 97 insertions, 66 deletions
diff --git a/abs/core/LinHES-config/PKGBUILD b/abs/core/LinHES-config/PKGBUILD
index 9417079..f5372aa 100755
--- a/abs/core/LinHES-config/PKGBUILD
+++ b/abs/core/LinHES-config/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=LinHES-config
pkgver=2.3
-pkgrel=88
+pkgrel=108
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'
@@ -123,25 +123,25 @@ build() {
install -o root -g root -D -m 0755 blacklist_pcspkr.conf $startdir/pkg/etc/modprobe.d/blacklist_pcspkr.conf
install -o root -g root -D -m 0755 blacklist_nouveau.conf $startdir/pkg/etc/modprobe.d/blacklist_nouveau.conf
}
-md5sums=('fe57dd29e1479073f667a5168b479d7f'
+md5sums=('666cacc9fc81a2c3d7f0175dfd6afd96'
'f33e1a6f7985091b8d47cbaf7433f90f'
- '3a20fb24a47e3a2afe49f1159551ebaa'
+ 'c5bca0a2333608391628a0b67b486e5c'
'2596460462cf6c889cf8f95485537b20'
'985891a43f7c4c983eb2a362162f1a0f'
- 'd1bb7a1449c44effe9ce7c621ea575a1'
- '8d876f7ab933c1c512d13311e0342da0'
+ '5e019ede24323a77f8d3812a93d38075'
+ '768504ef10ecd11a22875ccea9fcf62b'
'f73d6d6f98839e900cb6685bf5dc4eae'
'68199e861c2933ccbb84735b9b440157'
'2a7f3b34e522acfd08283b86c8926aba'
'60103d94ada98ac583fea620294f14d3'
- 'cf6eb99613ac7e5252995dc8735d9424'
+ '689b01f7636e09b2f9657c6ce6006ee7'
'ecf9e5df20683a769c4a8a8f2d65de85'
- '895d4e842d7457a48a6d2ce0e9c833b7'
+ 'a6faa20d905e2fd92ce79acab044b759'
'8ba06c2ce6129371548cc360ccca27f8'
- '55fccb1da0417a896b724f7cfc32dd5a'
+ '5f890ea9bda6aef652d2560ca19dac07'
'ab2aa42c2947148c2b1cac0ade6d1d55'
'd429b59d3cfb37b0624c6a4a71a7c2c0'
- 'a225143e3df6f56d451c2875e54ddbae'
+ 'f6a935c35123fdc7c259c01cbc794a64'
'9151c74fcaf18ec4cf5e757cfdbc7017'
'3d1e4a119f38cff0498bf8a67e94e4b3'
'71fd2d0d448fc2fcd15415a1beed7109'
@@ -157,7 +157,7 @@ md5sums=('fe57dd29e1479073f667a5168b479d7f'
'23d0e12b7ca1cc6ea6b993c1d7ff20b9'
'cc5ee06e2182bb825ca3712a1c1afb64'
'919909f4d23b9ee3caf71193c042cc40'
- '0dfd6968213aa045fef5048af687585a'
+ 'f15bce124e586b8e279c2f61a8e9b5fc'
'0dd5a895022a81aa2f87d761d3f43a87'
'2596460462cf6c889cf8f95485537b20'
'2bfa69776f57b459e690094dd249e863'
diff --git a/abs/core/LinHES-config/mv_install.py b/abs/core/LinHES-config/mv_install.py
index 00251e6..dab576d 100755
--- a/abs/core/LinHES-config/mv_install.py
+++ b/abs/core/LinHES-config/mv_install.py
@@ -474,10 +474,28 @@ def mount_it():
def unmount_it():
logging.info("______Unmounting disk______")
+ cmd = "mount -v |grep new_boot"
+ mp_list=[]
+ mplist=[]
+ mountpoint = runcmd(cmd)[1]
+ mplist="".join(mountpoint).split("\n")
+ for i in mplist:
+ mp = i.split()[2]
+ mp_list.append(mp)
+ mp_list.sort(key = len, reverse=True)
+ for i in mp_list:
+ cmd = "umount %s" %(i)
+ runcmd(cmd)
+ time.sleep(1)
+
+
+
cmd = "umount %s" %(data_config.MOUNTPOINT+data_config.DATAMOUNT)
runcmd(cmd)
time.sleep(2)
+
+
cmd = "swapoff /dev/%s" %(hostoptions["swappartition"])
runcmd(cmd)
@@ -607,10 +625,7 @@ def copy_it(install_type):
'rsync -arp /image_mount/usr /new_boot',
'rsync -arp /image_mount/var /new_boot']
- #'rsync -arvp /image_mount/lib /new_boot',
-
for cmd in cmdlist:
- #runcmd(cmd)
rc = runcmd(cmd)[0]
if rc != 0 :
error_out("Running %s" %cmd)
@@ -624,27 +639,13 @@ def copy_it(install_type):
'rsync -arp /image_mount/usr /new_boot',
'rsync -arp /image_mount/var /new_boot']
- #'rsync -arvp /image_mount/lib /new_boot',
-
for cmd in cmdlist:
#runcmd(cmd)
rc = runcmd(cmd)[0]
if rc != 0 :
error_out("Running %s" %cmd)
- #create_squashlist()
- #cmd = " unsquashfs -e %s -f -d %s /.livesys/medium/larch/system.sqf" %(data_config.SQUASHFILE, data_config.MOUNTPOINT)
-
- #rc = runcmd(cmd)[0]
- #if rc != 0 :
- # error_out("Running unsquashfs")
- #logging.debug(cmd)
- #cmdout=commands.getoutput(cmd)
-
-
-
-# Create the missing dir
- #i = ("sys", "proc", "dev", "tmp", "mnt", "media", "media/cdrom", "media/dvd", "var/log/mythtv", "var/lock", "var/tmp", "usr/lib/locale")
+ # Create the missing dir
i = ("sys", "proc", "dev", "tmp", "mnt", "media", "media/cdrom", "media/dvd", "var/lock", "var/tmp", "usr/lib/locale")
mountpoint = data_config.MOUNTPOINT
for item in i:
@@ -947,20 +948,44 @@ def grub_it():
cmd="chroot %s grub-mkconfig -o /boot/grub/grub.cfg" %data_config.MOUNTPOINT
runcmd(cmd)
-def double_mount():
+def double_mount(fe_only=False):
+ logging.info(" double bind mount attempt")
cmd = "mkdir %s/run/dbus" %data_config.MOUNTPOINT
runcmd(cmd)
cmd = " mount --bind /run/dbus %s/run/dbus" %data_config.MOUNTPOINT
runcmd(cmd)
-
- #cmd = "chroot " + data_config.MOUNTPOINT +" /usr/LH/bin/add_storage.py --double_myth --install_call --no_mount"
- cmd = "chroot " + data_config.MOUNTPOINT +" /usr/LH/bin/add_storage.py --double_myth --no_mount"
+ for i in range(0,5):
+ if fe_only == True:
+ cmd = "chroot " + data_config.MOUNTPOINT +" /usr/LH/bin/add_storage.py --double_myth --no_mount --fe_only"
+ else:
+ cmd = "chroot " + data_config.MOUNTPOINT +" /usr/LH/bin/add_storage.py --double_myth --no_mount"
+ if runcmd(cmd)[0] == 0:
+ logging.debug(" Add storage worked, breaking out of loop")
+ break
+ cmd = " umount %s/run/dbus" %data_config.MOUNTPOINT
runcmd(cmd)
+def move_myth_home(op):
+ logging.debug(" storage op %s" %op )
+ if op == "restore":
+ destfile = "/storage/data/"
+ srcfile = "/storage/data.old/*"
+ cmd = 'chroot %s bash -c "mv %s %s"' %(data_config.MOUNTPOINT,srcfile,destfile)
+ runcmd(cmd)
+
+ rmfile = "%s/storage/data.old" %data_config.MOUNTPOINT
+ cmd = "rmdir %s" %rmfile
+ runcmd(cmd)
+
+
+ if op == "backup":
+ srcfile = "%s/storage/data" %data_config.MOUNTPOINT
+ destfile = "%s/storage/data.old" %data_config.MOUNTPOINT
+ cmd = "mv %s %s" %(srcfile,destfile)
+ runcmd(cmd)
+
- cmd = " umount %s/run/dbus" %data_config.MOUNTPOINT
- runcmd(cmd)
@@ -1300,74 +1325,73 @@ def full_install(hostoptions):
swapon()
-# Find number of bytes written to disk before starting copy. This is used
-# to have a somewhat decent progress indication.
+ #Find number of bytes written to disk before starting copy. This is used
+ #to have a somewhat decent progress indication.
statgrab( hostoptions["rootdisk"])
msg = "Creating %s" %(systemconfig["hostname"])
update_status(msg)
-# Copy system to disk
+ #Copy system to disk
copy_it("install")
-# Remove old fstab so that a new one is created
+ #at this point /storage exisit and is populated with myth home dir
+
+
+ #Remove old fstab so that a new one is created
fstabfile = data_config.MOUNTPOINT+"/etc/fstab"
try:
os.remove(fstabfile)
except OSError:
logging.debug(" ERROR: deleting %s", fstabfile)
fstab_it("full_install")
+
# Configure system
msg = "Configuring system"
update_status(msg)
progress(98)
+
mount_bind_chroot()
grub_it()
- # double_mount()
umount_bind_chroot()
- genlocale()
+ genlocale() #currently does nothing
special_hardware_check()
-# Configuring the system
+
logging.info("______Configuring system________")
cp_and_log("/etc/systemconfig", data_config.MOUNTPOINT+"/etc/systemconfig")
+ cp_and_log("/etc/install_conf", data_config.MOUNTPOINT+"/etc/install_conf")
cp_and_log("/root/xorg.conf.install", data_config.MOUNTPOINT+"/etc/X11/xorg.conf.install")
- restore_default_settings()
- #try:
- #MVROOT=os.environ["MV_ROOT"]
- #except:
- #logging.debug(" MVROOT was not defined, using the default value")
- #MVROOT="/usr/MythVantage"
- #logging.info("Saving syssettings")
- #cmd="%s/bin/myth_settings_wrapper.sh -c save -t syssettings -h %s -d localhost" %(MVROOT, data_config.MVHOSTNAME)
- #runcmd(cmd)
- #SE=os.environ["TEMPLATES"]+"/settings/syssettings"
- #cp_and_log(SE, data_config.MOUNTPOINT+SE)
- #cp_and_log("/etc/mtab", data_config.MOUNTPOINT+"/etc/mtab")
- #cp_and_log2(MVROOT+"/bin/", data_config.MOUNTPOINT+MVROOT+"/bin/", "*.sh")
- #cp_and_log2(MVROOT+"/bin/", data_config.MOUNTPOINT+MVROOT+"/bin/", "*.py")
- #fix_permissions()
+
+ restore_default_settings() #also calls copy_updates, fix permissions
+
mount_bind_chroot()
apply_new_auth()
umount_bind_chroot()
+
if ( systemconfig["SystemType"] == "Master_backend" or systemconfig["SystemType"] == "Standalone" ):
-# This install will need a DB, so install it
+ #This install will need a DB, so install it
logging.info("______Installing Database in CHROOT________")
mysqldb("stop", '')
mount_bind_chroot()
cmd = "chroot %s %s/bin/install_db_chroot.sh |tee /tmp/chrootdb.out" %(data_config.MOUNTPOINT, MVROOT)
runcmd(cmd)
+
logging.info("Running systemconfig in chroot")
- #cmd = " chroot %s %s/bin/systemconfig.sh misc, hostype, network, advanced, user, this_is_install" %(data_config.MOUNTPOINT, MVROOT)
cmd = "chroot %s %s/bin/systemconfig.sh all,this_is_install" %(data_config.MOUNTPOINT, MVROOT)
rc = runcmd(cmd)[0]
if rc != 0 :
error_out("Running systemconfig")
+
+ move_myth_home("backup")
+
mysqldb("start","chroot")
double_mount()
- # sys.exit(3)
mysqldb("stop", "chroot")
- kill_dhcp_chroot()
+
+ move_myth_home("restore") #restoring after the bind mound/symlink has occured
+
+ #kill_dhcp_chroot()
logging.info("____End Database in CHROOT____")
mysqldb("start", '')
umount_bind_chroot()
@@ -1376,7 +1400,12 @@ def full_install(hostoptions):
mount_bind_chroot()
cmd = "chroot %s DISPLAY=127.0.0.1:0 %s/bin/MythVantage -t restore, default 1" %(data_config.MOUNTPOINT, MVROOT)
runcmd(cmd)
- double_mount()
+ move_myth_home("backup")
+ if systemconfig["SystemType"] == "Slave_backend":
+ double_mount()
+ else:
+ double_mount(fe_only=True)
+ move_myth_home("restore")
# Need to check for to touch /tmp/.dbsysfailed
#cmd = " chroot %s %s/bin/myth_settings_wrapper.sh -c restore -t syssettings " %(data_config.MOUNTPOINT, MVROOT)
#runcmd(cmd)
@@ -1393,15 +1422,17 @@ def full_install(hostoptions):
cmd = "chroot %s %s/bin/myth_settings_wrapper.sh -c ACCESSCONTROL " %(data_config.MOUNTPOINT, MVROOT)
runcmd(cmd)
umount_bind_chroot()
- cmd = " touch %s%s/.configure" %(data_config.MOUNTPOINT, data_config.MYTHHOME)
+
+ cmd = "chroot %s touch %s/.configure" %(data_config.MOUNTPOINT, data_config.MYTHHOME)
runcmd(cmd)
- cmd = " chmod 777 %s%s/.configure" %(data_config.MOUNTPOINT, data_config.MYTHHOME)
+ cmd = "chroot %s chmod 777 %s/.configure" %(data_config.MOUNTPOINT, data_config.MYTHHOME)
runcmd(cmd)
msg = "Done"
update_status(msg)
cp_and_log("/tmp/mythvantage_install.log", data_config.MOUNTPOINT+"/var/log/mythvantage_install.log")
cp_and_log("/tmp/mv_debug.log", data_config.MOUNTPOINT+"/var/log/mv_debug.log")
+ kill_dhcp_chroot()
unmount_it()
logging.debug("_____End of full install_____")
diff --git a/abs/core/LinHES-config/mv_vnc.py b/abs/core/LinHES-config/mv_vnc.py
index 63d155f..7d5bbb2 100755
--- a/abs/core/LinHES-config/mv_vnc.py
+++ b/abs/core/LinHES-config/mv_vnc.py
@@ -21,9 +21,9 @@ vncconfig -iconic &
if [ ! -e ~GNUstep ]
then
wmaker.inst
- cp -f /data/GNUstep/Defaults/WindowMaker ~/GNUstep/Defaults/
- cp -f /data/GNUstep/Defaults/WMState.vnc ~/GNUstep/Defaults/WMState
- cp -f /data/GNUstep/Defaults/WMWindowAttributes ~/GNUstep/Defaults/
+ cp -f /usr/share/wm_data/GNUstep/Defaults/WindowMaker ~/GNUstep/Defaults/
+ cp -f /usr/share/wm_data/GNUstep/Defaults/WMState.vnc ~/GNUstep/Defaults/WMState
+ cp -f /usr/share/wm_data/GNUstep/Defaults/WMWindowAttributes ~/GNUstep/Defaults/
fi
exec wmaker
'''