diff options
Diffstat (limited to 'modules/x11/kspost.90.tweaks.inc')
-rw-r--r-- | modules/x11/kspost.90.tweaks.inc | 88 |
1 files changed, 79 insertions, 9 deletions
diff --git a/modules/x11/kspost.90.tweaks.inc b/modules/x11/kspost.90.tweaks.inc index f930144..a8299c7 100644 --- a/modules/x11/kspost.90.tweaks.inc +++ b/modules/x11/kspost.90.tweaks.inc @@ -1,21 +1,91 @@ +# Disable "requiretty" for "wheel" group, so that "sudo" commands are be able to run in a terminal-less environment. +echo "Defaults:%wheel !requiretty" >> /etc/sudoers + +# sl#3267, enable ctrl+alt+erase to restart sugar for all xo-[1,1.5,1.75] laptops +sed -i -e '/DontZap/d' /usr/share/olpc-utils/xorg.conf.d/xo1.conf +sed -i -e '/DontZap/d' /usr/share/olpc-utils/xorg.conf.d/xo1.5.conf +sed -i -e '/DontZap/d' /usr/share/olpc-utils/xorg.conf.d/xo1.75.conf + +# Set microphone recording level +# don't think this is the right place JV +# might need to patch olpc-configure +echo "/usr/bin/amixer set \"Master Surround\" 31 unmute" > /etc/rc.d/rc.local +echo "/usr/bin/alsactl store" >> /etc/rc.d/rc.local + +cat << EOF > /usr/bin/yumfix +#!/usr/bin/env python +# Copyright (C) 2011, OLPC-AU. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +import os +import sys +import string +import gettext +import gconf + +def main(): + + + ## JV export http_proxy from .gconf + yumtmp = open("/tmp/yum.conf.mod", "w") + if not os.path.exists('/home/olpc/.gconf/system/proxy'): + yumtmp.close() + sys.exit(1) + sys_dir = '/system/http_proxy' + client = gconf.client_get_default() + use_proxy = client.get_string('/system/proxy/mode') + if use_proxy != 'none': + http_host = client.get_string('%s/host' % sys_dir) + http_port = client.get_int('%s/port' % sys_dir) + proxy_info = '%s:%d' % (http_host, http_port) + yumtmp.write('proxy=http://%s\n' % proxy_info) + use_auth = client.get_bool('%s/use_authentication' % sys_dir) + if use_auth is True: + auth_user = client.get_string('%s/authentication_user' % sys_dir) + yumtmp.write('proxy_username %s\n' % auth_user) + auth_pass = client.get_string('%s/authentication_password' % sys_dir) + yumtmp.write('proxy_password %s\n' % auth_pass) + else: + pass + yumtmp.close() + +main() + +EOF +chmod 755 /usr/bin/yumfix + +# run the above from ~/.xsession +echo "/usr/bin/yumfix" > /home/olpc/.xsession + +echo "include=/tmp/yum.conf.mod" >> /etc/yum.conf #au#704: add permissions for '/etc/ntp/step-tickers' file -chmod 0777 /etc/ntp -chmod 0777 /etc/ntp/step-tickers -# also, make the file empty. +mkdir -p /etc/ntp echo > /etc/ntp/step-tickers +chmod 0777 /etc/ntp/step-tickers /etc/ntp # uy#1375 : Utility Functions. SearchAndReplaceRegex() { - cat $1 | sed "s/$2/$3/g" > temp - cat temp > $1 + sed "s/$2/$3/g" "$1" -i } SearchAndDeleteLineContainingRegex() { - cat $1 | sed "/$2/d" > temp - cat temp > $1 + sed "/$2/d" "$1" -i } # uy#1375 (a): Append to "/home/olpc/.xsession" @@ -40,8 +110,8 @@ chmod -R 0777 /var/www/web1/ # Some necessary tweaks in "httpd" service. # -rm /etc/httpd/logs -mkdir /etc/httpd/logs +rm /etc/httpd/logs -f +mkdir /etc/httpd/logs -p # Generate the ssl-key and certificate. # Note that initially, all XOs will be having the same pair |