Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:DocB
Studio_Express_GNUHealth_2
config.sh
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File config.sh of Package Studio_Express_GNUHealth_2
#!/bin/bash #================ # FILE : config.sh #---------------- # PROJECT : OpenSuSE KIWI Image System # COPYRIGHT : (c) 2006 SUSE LINUX Products GmbH. All rights reserved # : # AUTHOR : Marcus Schaefer <ms@suse.de> # : # BELONGS TO : Operating System images # : # DESCRIPTION : configuration script for SUSE based # : operating systems # : # : # STATUS : BETA #---------------- #====================================== # Functions... #-------------------------------------- test -f /.kconfig && . /.kconfig test -f /.profile && . /.profile #====================================== # Greeting... #-------------------------------------- echo "Configure image: [$name]..." #====================================== # SuSEconfig #-------------------------------------- echo "** Running suseConfig..." suseConfig echo "** Running ldconfig..." /sbin/ldconfig #====================================== # Setup default runlevel #-------------------------------------- baseSetRunlevel 5 #====================================== # Add missing gpg keys to rpm #-------------------------------------- suseImportBuildKey #====================================== # Firewall Configuration #-------------------------------------- echo '** Configuring firewall...' chkconfig SuSEfirewall2_init on chkconfig SuSEfirewall2_setup on sed --in-place -e 's/# solver.onlyRequires.*/solver.onlyRequires = true/' /etc/zypp/zypp.conf #====================================== # Sysconfig Update #-------------------------------------- echo '** Update sysconfig entries...' baseUpdateSysConfig /etc/sysconfig/keyboard KEYTABLE english-us baseUpdateSysConfig /etc/sysconfig/network/config FIREWALL yes baseUpdateSysConfig /etc/init.d/suse_studio_firstboot NETWORKMANAGER yes baseUpdateSysConfig /etc/sysconfig/SuSEfirewall2 FW_SERVICES_EXT_TCP 22\ 80\ 443 baseUpdateSysConfig /etc/sysconfig/console CONSOLE_FONT lat9w-16.psfu baseUpdateSysConfig /etc/sysconfig/displaymanager DISPLAYMANAGER_AUTOLOGIN gnuhealth baseUpdateSysConfig /etc/sysconfig/displaymanager DISPLAYMANAGER kdm4 baseUpdateSysConfig /etc/sysconfig/windowmanager DEFAULT_WM kde #====================================== # Setting up overlay files #-------------------------------------- echo '** Setting up overlay files...' echo mkdir -p / mkdir -p / echo tar xfp /image/d58280a558f1a2c4b4dc03994f9dca59 -C / tar xfp /image/d58280a558f1a2c4b4dc03994f9dca59 -C / echo rm /image/d58280a558f1a2c4b4dc03994f9dca59 rm /image/d58280a558f1a2c4b4dc03994f9dca59 mkdir -p / # Modif Axel: attachs entpacken tar -xpjf /studio/overlay-tmp/files///gnuhealth_attachs.tar.bz2 -C / #mv /studio/overlay-tmp/files///gnuhealth_attachs.tar.bz2 //gnuhealth_attachs.tar.bz2 #chown tryton:users //gnuhealth_attachs.tar.bz2 #chmod 666 //gnuhealth_attachs.tar.bz2 echo mkdir -p / mkdir -p / echo tar xfp /image/1cd4224388463f5a77e0600ee0908883 -C / tar xfp /image/1cd4224388463f5a77e0600ee0908883 -C / echo rm /image/1cd4224388463f5a77e0600ee0908883 rm /image/1cd4224388463f5a77e0600ee0908883 mkdir -p / mv /studio/overlay-tmp/files///gnuhealth_db_32.tar.bz2 //gnuhealth_db_32.tar.bz2 chown postgres:root //gnuhealth_db_32.tar.bz2 chmod 644 //gnuhealth_db_32.tar.bz2 echo mkdir -p / mkdir -p / echo tar xfp /image/konqueror_settingstarbz2-CevUDLT35j -C / tar xfp /image/konqueror_settingstarbz2-CevUDLT35j -C / echo rm /image/konqueror_settingstarbz2-CevUDLT35j rm /image/konqueror_settingstarbz2-CevUDLT35j mkdir -p / mv /studio/overlay-tmp/files///konqueror_settings.tar.bz2 //konqueror_settings.tar.bz2 chown root:root //konqueror_settings.tar.bz2 chmod 644 //konqueror_settings.tar.bz2 echo mkdir -p /home/gnuhealth/ mkdir -p /home/gnuhealth/ echo tar xfp /image/f1d7890c4d1a0ddeda55afa8789aafda -C /home/gnuhealth/ tar xfp /image/f1d7890c4d1a0ddeda55afa8789aafda -C /home/gnuhealth/ echo rm /image/f1d7890c4d1a0ddeda55afa8789aafda rm /image/f1d7890c4d1a0ddeda55afa8789aafda mkdir -p /home/gnuhealth/ mv /studio/overlay-tmp/files//home/gnuhealth//libreoffice.tar.bz2 /home/gnuhealth//libreoffice.tar.bz2 chown gnuhealth:users /home/gnuhealth//libreoffice.tar.bz2 chmod 644 /home/gnuhealth//libreoffice.tar.bz2 echo mkdir -p /home/gnuhealth/ mkdir -p /home/gnuhealth/ echo tar xfp /image/459b58986582d024cae6ea46cba30119 -C /home/gnuhealth/ tar xfp /image/459b58986582d024cae6ea46cba30119 -C /home/gnuhealth/ echo rm /image/459b58986582d024cae6ea46cba30119 rm /image/459b58986582d024cae6ea46cba30119 mkdir -p /home/gnuhealth/ mv /studio/overlay-tmp/files//home/gnuhealth//Tryton_42.tar.bz2 /home/gnuhealth//Tryton_42.tar.bz2 chown gnuhealth:users /home/gnuhealth//Tryton_42.tar.bz2 chmod 644 /home/gnuhealth//Tryton_42.tar.bz2 mkdir -p /etc/init.d/ mv /studio/overlay-tmp/files//etc/init.d//boot.local /etc/init.d//boot.local chown root:root /etc/init.d//boot.local chmod 755 /etc/init.d//boot.local mkdir -p /etc/skel/.kde4/share/config/ mv /studio/overlay-tmp/files//etc/skel/.kde4/share/config//dolphinrc /etc/skel/.kde4/share/config//dolphinrc chown gnuhealth:users /etc/skel/.kde4/share/config//dolphinrc chmod 644 /etc/skel/.kde4/share/config//dolphinrc mkdir -p /home/gnuhealth/Desktop/ mv /studio/overlay-tmp/files//home/gnuhealth/Desktop//GNUHealth.desktop /home/gnuhealth/Desktop//GNUHealth.desktop chown gnuhealth:users /home/gnuhealth/Desktop//GNUHealth.desktop chmod 755 /home/gnuhealth/Desktop//GNUHealth.desktop mkdir -p /home/gnuhealth/Desktop/ mv /studio/overlay-tmp/files//home/gnuhealth/Desktop//GNUHealth_Live_CD.README.SUSE /home/gnuhealth/Desktop//GNUHealth_Live_CD.README.SUSE chown gnuhealth:users /home/gnuhealth/Desktop//GNUHealth_Live_CD.README.SUSE chmod 644 /home/gnuhealth/Desktop//GNUHealth_Live_CD.README.SUSE mkdir -p /etc/sysconfig/ mv /studio/overlay-tmp/files//etc/sysconfig//SuSEfirewall2 /etc/sysconfig//SuSEfirewall2 chown root:root /etc/sysconfig//SuSEfirewall2 chmod 644 /etc/sysconfig//SuSEfirewall2 mkdir -p /etc/tryton/ mv /studio/overlay-tmp/files//etc/tryton//trytond.conf /etc/tryton//trytond.conf chown root:root /etc/tryton//trytond.conf chmod 644 /etc/tryton//trytond.conf test -d /studio || mkdir /studio cp /image/.profile /studio/profile cp /image/config.xml /studio/config.xml chown root:root /studio/build-custom chmod 755 /studio/build-custom # run custom build_script after build if ! /studio/build-custom; then cat <<EOF ********************************* /studio/build-custom failed! ********************************* EOF exit 1 fi rm -rf /studio/overlay-tmp true #====================================== # Configure PostgreSQL database #-------------------------------------- DATADIR=~postgres/data # Handy wrapper to call pg_ctl with the correct user. pg_ctl () { CMD="/usr/bin/pg_ctl $@" su - postgres -c "$CMD" } # Helper function to execute the given sql file. execute_sql_file() { su postgres -c "psql -q < $1 2>&1" } # Initialize PostgreSQL echo "## Initializing PostgreSQL databases and tables..." # Setting /tmp to 777 with sticky bit for initdb to work properly # Fix for bnc#919520 echo "## Setting /tmp to 777 with sticky bit..." chmod a+trwx /tmp LANG_SYSCONFIG=/etc/sysconfig/language LANG=$(test -f $LANG_SYSCONFIG && . $LANG_SYSCONFIG && echo ${POSTGRES_LANG:-$RC_LANG}) install -d -o postgres -g postgres -m 700 ${DATADIR} && su - postgres -c \ "/usr/bin/initdb --locale=$LANG --auth='ident' $DATADIR &> initlog" # Start PostgreSQL without networking echo "## Starting PostgreSQL..." pg_ctl start -s -w -D $DATADIR # Load PostgreSQL data dump, if it exists pgsql_dump=/tmp/pgsql_dump.sql if [ -f "$pgsql_dump" ]; then echo "## Loading PostgreSQL data dump..." execute_sql_file "$pgsql_dump" else echo "## No PostgreSQL data dump found, skipping" fi # Load PostgreSQL users and permissions, if setup file exists pgsql_perms=/tmp/pgsql_config.sql if [ -f "$pgsql_perms" ]; then echo "## Loading PostgreSQL users and perms..." execute_sql_file "$pgsql_perms" # update config file to allow md5 login sed -i "s/^\(host .*\) ident/\1 md5/" /var/lib/pgsql/data/pg_hba.conf else echo "## No PostgreSQL user/perms config found, skipping" fi # Auto-start PostgreSQL echo "## Configuring PostgreSQL to auto-start on boot..." chkconfig postgresql on # Stop PostgreSQL service (for uncontained builds) echo "## Stopping PostgreSQL..." pg_ctl stop -s -D $DATADIR -m fast # Clean up temp files (for uncontained builds) rm -f "$pgsql_perms" "$pgsql_dump" echo "## PostgreSQL configuration complete" #====================================== # SSL Certificates Configuration #-------------------------------------- echo '** Rehashing SSL Certificates...' c_rehash sh /studio/configure_kdm4_theme.sh sh /studio/configure_kde4_background.sh
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor