Author Topic: Configuration lock/unlock  (Read 5871 times)

Armor Gnome

  • Guru
  • ****
  • Posts: 309
    • View Profile
Configuration lock/unlock
« on: April 26, 2013, 01:43:42 pm »
I have had a lot of issues with standard installation devices working and then breaking after a reboot because of driver/kernel changes that I am not initiating.  Instead of hacking my install to bits and ending up with something other than LinuxMCE I wish to develop a feature.  My plan will be to write a small shell script and perhaps a few supporting files.  If they work without changing much else than I would like a dev to try it out and then figure out how to submit it.

Devices currently breaking themselves as examples:

Hybrid install w/ onboard ATI 4200 HD.  Can be installed from snapshots or 10.04 Final and works amazing with onboard HDMI w/ audio etc, as long as the hybrid is off-line.  If the machine has Internet during install or any reboot after it loads back ports and flgrx driver which breaks it.

Acer Revo 1600R as MD.  First install as new MD works flawless and uses the nvidia driver.  The MD continues to work unless it has to reboot, be reset.  On any reboot after initial it removes the nvidia driver automatically and will not run again until the moon# is deleted and re-detected as a new device.

My executable:
/usr/Pluto/bin/freeze_settings.sh & unfreeze_settings.sh. (This would also need to be present in /usr/Pluto/diskless/##/usr/Pluto/bin/

Replace sources.list with a blank or commented out version?

My problem, and where I need some assistance please:

LMCEs entire structure is built around detection, self testing and configuring new devices.  I had tried everything I can to prevent a problem driver (and will need to try for the Revo) from making two working devices into non-working devices.  Utils.sh rewrites itself, killing sources.list alone would not stop other detections from going off such as storage radar etc...

I am going to write it and test it but,

If you wanted to cement a configuration of your own, which files/scripts/initd/modprobe/blacklists would you change?
I made a wiki!  Click here to check out my system.

Armor Gnome

  • Guru
  • ****
  • Posts: 309
    • View Profile
Re: Configuration lock/unlock
« Reply #1 on: April 28, 2013, 03:10:43 pm »
I havent made much progress on this yet as I have been setting up a replacement core.  Once that is running I will be doing an intentionally aggressive reboot/add/remove over the next three days for any signs of driver issues or stability problems with the hardware itself.  During that time I will be preparing notes for the "real" installation and locked settings.

My new thought on this actually makes it simple and could already exist.  "Offline Mode," I selected this in the web admin site and was still able to use web-bookmarks from a MD.  Is anyone familiar with the desired use of Offline Mode is/was?

If Offline Mode is not allready in place to handle this route I am looking to open up, I believe all I need to do is comment sources.list.  Much like the Stop-MediaUpdater, I can write a toggle script that would rename (swap name) two files:  sources.list and [anything].list.  Prior to adding a device or changing something the user would have to toggle sources.list to pull packages automatically but for working equipment I am and others may be willing to.

Sources of sources?

etc/apt/sources.  obviously is the main location and where the actual url exists, however there may be other avenues I am not familiar with such as buried away in databases. 
In web-admin packages there are the needed packages and build instructions for any device that may be added.  When something is added that needs a special download could/would pluto-main or pluto-dcerouter modify the sources.list to add repos it keeps record of?
I made a wiki!  Click here to check out my system.

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Configuration lock/unlock
« Reply #2 on: April 28, 2013, 04:35:00 pm »
apt-get upgrade is not run automatically, so there is no need to uncomment any sources.list entries.

ConfirmDependencies, which is run whenever a new device is detected does modify sources.list, but again, does NEVER run apt-get upgrade.

Armor Gnome

  • Guru
  • ****
  • Posts: 309
    • View Profile
Re: Configuration lock/unlock
« Reply #3 on: May 02, 2013, 11:08:19 pm »
Thanks Posde.

I will look into confirm dependencies a little more.  Manipulations I may make at that level could certainly do a lot of harm so perhaps I should rethink my approach.  A backup prior to setting changes happening automagically with a boot-time option to rollback perhaps.

A small number of reboot test so far have held up with a manually un commented sources.list and manually inserted Pluto.conf and xorg.conf.  Asound & myth are my next hurdles as I can't get sound on them yet.
I made a wiki!  Click here to check out my system.

Armor Gnome

  • Guru
  • ****
  • Posts: 309
    • View Profile
Re: Configuration lock/unlock
« Reply #4 on: May 06, 2013, 12:12:31 am »
I was successful in making a few LMCE breakers.  My inexperience with making scripts into executible .sh prevented me from further integrating it as a computing application etc.  I am basically just toggling between two sources.list files with rename commands. 

example.   
/etc/apt/sources_off.list = ##original list
/etc/apt/sources_on.list = the toggled state (useful to know if which file is active, with a simple search if the file sources_off exists then the ## is in use, if sources_on exists then the original is in place)
/etc/apt/sources.list = original list

disable_updates.sh
rename sources.list to sources_off.list
rename sources_on.list to sources.list

enable_updates.sh
rename sources.list to sources_on.list
rename sources_off to sources.list

As Posde mentioned, I only had this on my core.  It was the only machine that I could not resolve automagic updates on.  Use of the past tense here is important because having onboard video continue to work after installation on a hybrid was not worth the frustration of having to remember to toggle every time I did just about anything on the network.  I instead placed a $5 ATI X300 card into the hybrid and use its VGA output.  The simplicity of the toggled state .list way of applying or removing settings may be helpful and simple for other issues people are looking for a temporary solution on.

I made a wiki!  Click here to check out my system.