├── files ├── run │ └── utmp ├── var │ ├── log │ │ ├── btmp │ │ ├── wtmp │ │ └── lastlog │ └── adm │ │ └── fillup-templates │ │ ├── sysconfig.news │ │ ├── sysconfig.windowmanager │ │ ├── sysconfig.backup │ │ ├── sysconfig.proxy │ │ └── sysconfig.language ├── etc │ ├── sysctl.conf │ ├── hushlogins │ ├── profile.d │ │ ├── ls.zsh │ │ ├── malloc-debug.csh │ │ ├── malloc-debug.sh │ │ ├── alias.tcsh │ │ ├── csh.ssh │ │ ├── sh.ssh │ │ ├── ls.tcsh │ │ ├── xdg-environment.csh │ │ ├── alljava.csh │ │ ├── alias.ash │ │ ├── alias.bash │ │ ├── xdg-environment.sh │ │ ├── alljava.sh │ │ ├── ls.bash │ │ ├── lang.sh │ │ ├── lang.csh │ │ ├── profile.sh │ │ └── profile.csh │ ├── shells │ ├── cron.daily │ │ ├── suse.de-cron-local │ │ ├── suse.de-check-battery │ │ ├── suse.de-backup-rc.config │ │ └── suse.de-backup-rpmdb │ ├── ttytype │ ├── skel │ │ ├── .inputrc │ │ └── .emacs │ ├── inputrc │ ├── rc.splash │ ├── DIR_COLORS │ ├── csh.cshrc │ ├── java │ │ └── README │ ├── csh.login │ ├── profile │ ├── bash.bashrc │ └── rc.status ├── usr │ ├── bin │ │ ├── safe-rmdir │ │ ├── filesize │ │ ├── rpmlocate │ │ ├── setJava │ │ ├── old │ │ ├── safe-rm │ │ ├── ChangeSymlinks │ │ └── mkinfodir │ ├── share │ │ └── man │ │ │ ├── man8 │ │ │ ├── safe-rmdir.8 │ │ │ ├── quick_halt.8 │ │ │ ├── safe-rm.8 │ │ │ ├── service.8 │ │ │ ├── resolv+.8 │ │ │ └── chkconfig.8 │ │ │ ├── man5 │ │ │ ├── route.conf.5 │ │ │ └── defaultdomain.5 │ │ │ ├── man1 │ │ │ └── smart_agetty.1 │ │ │ └── man7 │ │ │ └── init.d.7 │ ├── lib │ │ ├── restricted │ │ │ └── bin │ │ │ │ └── hostname │ │ └── sysctl.d │ │ │ ├── 50-default-s390.conf │ │ │ └── 50-default.conf │ └── sbin │ │ ├── Check │ │ ├── setDefaultJava │ │ ├── refresh_initrd │ │ ├── smart_agetty │ │ ├── sysconf_addword │ │ └── service ├── sbin │ ├── service │ ├── chkconfig │ ├── smart_agetty │ └── refresh_initrd └── lib │ └── aaa_base │ └── convert_sysctl ├── patches ├── s390x │ └── ttytype.diff └── s390 │ └── ttytype.diff ├── .whitesource ├── README ├── obs ├── mkchanges ├── mktar └── mkpackage ├── Makefile ├── mimetypemerge ├── get_kernel_version.c ├── aaa_base.pre ├── aaa_base.post └── COPYING /files/run/utmp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /files/var/log/btmp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /files/var/log/wtmp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /files/etc/sysctl.conf: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /files/var/log/lastlog: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /files/etc/hushlogins: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /files/usr/bin/safe-rmdir: -------------------------------------------------------------------------------- 1 | safe-rm -------------------------------------------------------------------------------- /files/sbin/service: -------------------------------------------------------------------------------- 1 | ../usr/sbin/service -------------------------------------------------------------------------------- /files/sbin/chkconfig: -------------------------------------------------------------------------------- 1 | ../usr/bin/chkconfig -------------------------------------------------------------------------------- /files/sbin/smart_agetty: -------------------------------------------------------------------------------- 1 | ../usr/sbin/smart_agetty -------------------------------------------------------------------------------- /files/usr/share/man/man8/safe-rmdir.8: -------------------------------------------------------------------------------- 1 | safe-rm.8 -------------------------------------------------------------------------------- /patches/s390x/ttytype.diff: -------------------------------------------------------------------------------- 1 | ../s390/ttytype.diff -------------------------------------------------------------------------------- /files/sbin/refresh_initrd: -------------------------------------------------------------------------------- 1 | ../usr/sbin/refresh_initrd -------------------------------------------------------------------------------- /files/usr/lib/restricted/bin/hostname: -------------------------------------------------------------------------------- 1 | /bin/hostname -------------------------------------------------------------------------------- /files/usr/bin/filesize: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Print the size of a file, in bytes. 4 | # 5 | stat -c %s "$1" 6 | -------------------------------------------------------------------------------- /files/usr/share/man/man5/route.conf.5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tux/aaa_base/master/files/usr/share/man/man5/route.conf.5 -------------------------------------------------------------------------------- /files/etc/profile.d/ls.zsh: -------------------------------------------------------------------------------- 1 | z_ls () 2 | { 3 | local IFS=' ' 4 | command \ls $=LS_OPTIONS ${1+"$@"} 5 | } 6 | alias ls=z_ls 7 | -------------------------------------------------------------------------------- /files/etc/profile.d/malloc-debug.csh: -------------------------------------------------------------------------------- 1 | # remove this file before shipment 2 | setenv MALLOC_CHECK_ 3 3 | setenv MALLOC_PERTURB_ 69 4 | -------------------------------------------------------------------------------- /files/etc/profile.d/malloc-debug.sh: -------------------------------------------------------------------------------- 1 | # remove this file before shipment 2 | export MALLOC_CHECK_=3 3 | export MALLOC_PERTURB_=69 4 | -------------------------------------------------------------------------------- /.whitesource: -------------------------------------------------------------------------------- 1 | { 2 | "generalSettings": { 3 | "shouldScanRepo": true 4 | }, 5 | "checkRunSettings": { 6 | "vulnerableCheckRunConclusionLevel": "failure" 7 | } 8 | } -------------------------------------------------------------------------------- /files/usr/sbin/Check: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # this script is obsolete. We keep it around to avoid boot strapping 3 | # problems as some rpm macros may still refer to it. 4 | echo "/usr/sbin/Check is obsolete, don't call it!" 5 | exit 0 6 | -------------------------------------------------------------------------------- /files/usr/lib/sysctl.d/50-default-s390.conf: -------------------------------------------------------------------------------- 1 | # performance tuning for s390(x) 2 | kernel.sched_min_granularity_ns = 10000000 3 | kernel.sched_wakeup_granularity_ns = 15000000 4 | kernel.sched_latency_ns = 80000000 5 | kernel.sched_tunable_scaling = 0 6 | -------------------------------------------------------------------------------- /patches/s390/ttytype.diff: -------------------------------------------------------------------------------- 1 | --- etc/ttytype 2 | +++ etc/ttytype 2017-05-12 14:20:34.524454300 +0000 3 | @@ -4,7 +4,7 @@ linux tty3 4 | linux tty4 5 | linux tty5 6 | linux tty6 7 | -vt220 ttyS0 8 | +dumb ttyS0 9 | vt220 ttyS1 10 | vt220 ttyS2 11 | vt220 ttyS3 12 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | aaa_base 2 | ======== 3 | 4 | This repository makes up the tar ball in the aaa_base package 5 | http://build.opensuse.org/package/show?package=aaa_base&project=Base:System 6 | 7 | After commit, checkout Base:System aaa_base and run 8 | osc service dr 9 | 10 | -------------------------------------------------------------------------------- /files/var/adm/fillup-templates/sysconfig.news: -------------------------------------------------------------------------------- 1 | ## Path: Network/News 2 | ## Description: 3 | ## Type: string 4 | ## Default: "" 5 | # 6 | # Used for News-Postings. 7 | # 8 | ORGANIZATION="" 9 | 10 | ## Type: string(news) 11 | ## Default: news 12 | # 13 | # News server. 14 | # 15 | NNTPSERVER="news" 16 | -------------------------------------------------------------------------------- /files/etc/profile.d/alias.tcsh: -------------------------------------------------------------------------------- 1 | alias o 'less' 2 | alias .. 'cd ..' 3 | alias ... 'cd ../..' 4 | alias cd.. 'cd ..' 5 | alias rd rmdir 6 | alias md 'mkdir -p' 7 | alias startx 'if ( ! -x /usr/bin/startx ) echo "No startx installed";\ 8 | if ( -x /usr/bin/startx ) /usr/bin/startx |& tee ${HOME}/.xsession-error' 9 | alias remount '/bin/mount -o remount,\!*' 10 | -------------------------------------------------------------------------------- /files/etc/shells: -------------------------------------------------------------------------------- 1 | /bin/ash 2 | /bin/bash 3 | /bin/csh 4 | /bin/dash 5 | /bin/false 6 | /bin/ksh 7 | /bin/ksh93 8 | /bin/mksh 9 | /bin/pdksh 10 | /bin/sh 11 | /bin/tcsh 12 | /bin/true 13 | /bin/zsh 14 | /usr/bin/csh 15 | /usr/bin/dash 16 | /usr/bin/ksh 17 | /usr/bin/ksh93 18 | /usr/bin/mksh 19 | /usr/bin/passwd 20 | /usr/bin/pdksh 21 | /usr/bin/bash 22 | /usr/bin/tcsh 23 | /usr/bin/zsh 24 | -------------------------------------------------------------------------------- /files/usr/bin/rpmlocate: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright (c) 1999 SuSE Linux AG, Nuernberg, Germany. All rights reserved. 4 | # 5 | 6 | for i in $* ; do 7 | echo Searching for "$i" in rpm db... 8 | rpm -qal --qf "%{NAME}-%{VERSION}-%{RELEASE}:\n" | \ 9 | grep "\(^[^/]\)\|\($i\)" | \ 10 | awk '/^[^/]/ { pkg=$0; next } { if ( pkg ) { print "\n"pkg; pkg="" } print }' 11 | done 12 | 13 | -------------------------------------------------------------------------------- /files/etc/cron.daily/suse.de-cron-local: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # 4 | # Copyright (c) 2002 SuSE Linux AG, Nuernberg, Germany. 5 | # 6 | # please send bugfixes or comments to http://www.suse.de/feedback. 7 | # 8 | 9 | 10 | # 11 | # paranoia settings 12 | # 13 | umask 022 14 | 15 | PATH=/sbin:/bin:/usr/sbin:/usr/bin 16 | export PATH 17 | 18 | # now start the local cron.daily file, if it exists. 19 | 20 | if [ -f /root/bin/cron.daily.local ] ; then 21 | . /root/bin/cron.daily.local 22 | fi 23 | 24 | exit 0 25 | -------------------------------------------------------------------------------- /obs/mkchanges: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # create log suitable for c&p into rpm changes file 3 | if [ -z "$1" ]; then 4 | # this assumes the remote branch has the same name as ours 5 | b=`git rev-parse --abbrev-ref HEAD` 6 | set -- remotes/origin/$b..$b 7 | elif [ "${1%.changes}" != "$1" ]; then 8 | # parse time stamp of .changes file 9 | d=`awk 'NR==2{FS=" - ";$0=$0;print $1;exit}' < $1` 10 | set -- --since="$d" HEAD 11 | fi 12 | # no idea why it always prints those commit lines 13 | git rev-list --pretty=format:"- %s" "$@" |grep -v ^commit 14 | -------------------------------------------------------------------------------- /files/var/adm/fillup-templates/sysconfig.windowmanager: -------------------------------------------------------------------------------- 1 | ## Path: Desktop/Window manager 2 | ## Description: 3 | ## Type: string(gnome,kde-plasma,kde,plasma5,lxde,xfce,twm,icewm,enlightenment) 4 | ## Default: kde-plasma 5 | ## Config: profiles,kde,susewm 6 | # 7 | # Here you can set the default window manager (kde, fvwm, ...) 8 | # changes here require at least a re-login 9 | DEFAULT_WM="kde-plasma" 10 | 11 | ## Type: yesno 12 | ## Default: yes 13 | # 14 | # install the SUSE extension for new users 15 | # (theme and additional functions) 16 | # 17 | INSTALL_DESKTOP_EXTENSIONS="yes" 18 | -------------------------------------------------------------------------------- /obs/mktar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | NAME=aaa_base 4 | VERSION=13.2 5 | scmver=`git log -n1 --date=short --pretty=format:"git%cd.%h"|sed 's@-@@g'` 6 | #LAST_COMMIT=(`git rev-list --timestamp HEAD^..HEAD`) 7 | #DATE=`date +$datefmt -d "1970-01-01 00:00 UTC $LAST_COMMIT seconds"` 8 | #scmver="$DATE" 9 | fullver="$VERSION${scmver:++}$scmver" 10 | pfx="$NAME${fullver:+-$fullver}" 11 | fn="$pfx".tar.xz 12 | if ! git config --get tar.umask >/dev/null 2>&1 ; then 13 | git config --add tar.umask 022 14 | fi 15 | git archive --prefix="$pfx"/ HEAD | xz > $fn 16 | echo "VERSION=$fullver" 17 | echo "FILENAME=$fn" 18 | -------------------------------------------------------------------------------- /files/usr/bin/setJava: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright (c) 2000-2002 SuSE Linux AG, Nuernberg, Germany. 3 | # All rights reserved. 4 | # 5 | # Author: Sonja Krause-Harder 6 | 7 | echo -e \ 8 | '################################################################\n'\ 9 | '# setJava is no longer supported. Please install the package #\n'\ 10 | '# jpackage-utils and read the documentation in #\n'\ 11 | '# /usr/share/doc/packages/jpackage-utils for information about #\n'\ 12 | '# the new java packages on SUSE Linux. #\n'\ 13 | '################################################################' 14 | 15 | -------------------------------------------------------------------------------- /files/usr/sbin/setDefaultJava: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright (c) 2000-2002 SuSE Linux AG, Nuernberg, Germany. 3 | # All rights reserved. 4 | # 5 | # Author: Sonja Krause-Harder 6 | 7 | echo -e \ 8 | '################################################################\n'\ 9 | '# setDefaultJava is no longer supported. Please install the #\n'\ 10 | '# package jpackage-utils and read the documentation in #\n'\ 11 | '# /usr/share/doc/packages/jpackage-utils for information about #\n'\ 12 | '# the new java packages on SUSE Linux. #\n'\ 13 | '################################################################' 14 | 15 | -------------------------------------------------------------------------------- /files/etc/profile.d/csh.ssh: -------------------------------------------------------------------------------- 1 | # 2 | # Check if a login was requested by a ssh. If this is 3 | # true and a locale was provided by the ssh the variable 4 | # SSH_SENDS_LOCALE is set to yes and will be exported 5 | # to all sub shells and processes. 6 | # 7 | if ( ${?SSH_CONNECTION} ) then 8 | set val=0 9 | foreach lc (LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE \ 10 | LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS \ 11 | LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL) 12 | eval set val=\${\?$lc} 13 | if ( $val != 0 ) then 14 | setenv SSH_SENDS_LOCALE yes 15 | unset lc val 16 | break 17 | endif 18 | end 19 | unset lc val 20 | setenv LIBGL_DEBUG quiet 21 | endif 22 | -------------------------------------------------------------------------------- /files/etc/cron.daily/suse.de-check-battery: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # 4 | # Copyright (c) 2002 SuSE Linux AG, Nuernberg, Germany. 5 | # 6 | # please send bugfixes or comments to http://www.suse.de/feedback. 7 | # 8 | 9 | 10 | # 11 | # paranoia settings 12 | # 13 | umask 022 14 | 15 | PATH=/sbin:/bin:/usr/sbin:/usr/bin 16 | export PATH 17 | 18 | # 19 | # check CMOS Battery 20 | # 21 | test -r /proc/driver/rtc && \ 22 | BATT_STATUS=$(awk '$1 == "batt_status" { print $3 }' /proc/driver/rtc) 23 | 24 | test -r /proc/rtc && \ 25 | BATT_STATUS=$(awk '$1 == "batt_status" { print $3 }' /proc/rtc) 26 | 27 | 28 | test -n "$BATT_STATUS" -a "$BATT_STATUS" != "okay" && \ 29 | echo "CMOS battery empty -- expect problems" 30 | 31 | exit 0 32 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS=-O2 -g -Wall 2 | CPPFLAGS=-D_FILE_OFFSET_BITS=64 3 | LDFLAGS=-Wl,-z,relro,-z,now 4 | 5 | bin_PROGRAMS=get_kernel_version 6 | 7 | all: $(bin_PROGRAMS) 8 | 9 | install: all 10 | cp -a files/* $(DESTDIR)/ 11 | install -m755 get_kernel_version $(DESTDIR)/usr/bin 12 | 13 | clean: 14 | rm -f $(sbin_PROGRAMS) 15 | 16 | package: 17 | obs/mkpackage 18 | 19 | mimetypes: 20 | if test -d Apache/apache2; then (cd Apache/apache2 && osc up); else osc co Apache/apache2; fi 21 | tar --wildcards -Oxjf Apache/apache2/httpd-*.tar.bz2 '*/docs/conf/mime.types' > mime.types.apache 22 | ./mimetypemerge files/etc/mime.types mime.types.apache > mime.types 23 | mv mime.types files/etc/mime.types 24 | 25 | .PHONY: all install clean package mimetypes 26 | -------------------------------------------------------------------------------- /files/usr/share/man/man8/quick_halt.8: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) 2003 SuSE Linux AG 2 | .\"$Id:$ 3 | .TH quick_halt 8 4 | .SH NAME 5 | quick_halt \- stop the system quickly 6 | .SH SYNOPSIS 7 | \fBquick_halt\fR, \fBquick_reboot\fR, \fBquick_poweroff\fR 8 | .SH DESCRIPTION 9 | Fast system shutdown, that does not carefully stop every single service 10 | in the specified order, but just sends a TERM and KILL to everyone 11 | and makes sure the filesystems get shut down properly prior to 12 | reboot/halt/poweroff 13 | .SH DIAGNOSTICS 14 | If you're not the superuser, you will get the message 15 | "You need to be root to execute quick_halt". 16 | .BR 17 | .SH "SEE ALSO" 18 | .BR \fBshutdown\fR(8), \fBinit\fR(1), \fBhalt\fR(8), \fBpoweroff\fR(8), \fBreboot\fR(8), \fBfsck\fR(8) 19 | .SH AUTHOR 20 | Kurt Garloff 21 | .BR 22 | -------------------------------------------------------------------------------- /files/etc/profile.d/sh.ssh: -------------------------------------------------------------------------------- 1 | # 2 | # Check if a login was requested by a ssh. If this is 3 | # true and a locale was provided by the ssh the variable 4 | # SSH_SENDS_LOCALE is set to yes and will be exported 5 | # to all sub shells and processes. 6 | # 7 | test_lc() 8 | { 9 | for lc in LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE \ 10 | LC_MONETARY LC_MESSAGES LC_PAPER LC_NAMELC_ADDRESS \ 11 | LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL 12 | do 13 | eval val="\$$lc" 14 | if test -n "$val" ; then 15 | unset lc val 16 | return 0 17 | fi 18 | done 19 | unset lc val 20 | return 1 21 | } 22 | 23 | if test -n "$SSH_CONNECTION" ; then 24 | if test_lc ; then 25 | SSH_SENDS_LOCALE=yes 26 | export SSH_SENDS_LOCALE 27 | fi 28 | LIBGL_DEBUG=quiet 29 | export LIBGL_DEBUG 30 | fi 31 | -------------------------------------------------------------------------------- /files/etc/ttytype: -------------------------------------------------------------------------------- 1 | linux tty1 2 | linux tty2 3 | linux tty3 4 | linux tty4 5 | linux tty5 6 | linux tty6 7 | vt220 ttyS0 8 | vt220 ttyS1 9 | vt220 ttyS2 10 | vt220 ttyS3 11 | vt220 ttyS4 12 | vt220 ttyS5 13 | vt220 ttyS6 14 | vt220 ttyS7 15 | vt220 ttyS8 16 | vt220 ttyS9 17 | vt220 ttyS10 18 | vt220 ttyS11 19 | vt220 ttyS12 20 | vt220 ttyS13 21 | vt220 ttyS14 22 | vt220 ttyS15 23 | vt220 ttyS16 24 | vt220 ttyS17 25 | vt220 ttyS18 26 | vt220 ttyS19 27 | vt220 ttyS20 28 | vt220 ttyS21 29 | vt220 ttyS22 30 | vt220 ttyS23 31 | vt220 ttyS24 32 | vt220 ttyS25 33 | vt220 ttyS26 34 | vt220 ttyS27 35 | vt220 ttyS28 36 | vt220 ttyS29 37 | vt220 ttyS30 38 | vt220 ttyS31 39 | vt220 hvc0 40 | vt220 hvc1 41 | vt220 hvc2 42 | vt220 hvc3 43 | vt220 xvc0 44 | vt220 xvc1 45 | vt220 xvc2 46 | vt220 xvc3 47 | vt220 hvsi0 48 | vt220 hvsi1 49 | vt220 hvsi2 50 | vt220 hvsi3 51 | -------------------------------------------------------------------------------- /files/etc/profile.d/ls.tcsh: -------------------------------------------------------------------------------- 1 | if (! ${?prompt}) goto done 2 | 3 | # 4 | if ( -x /usr/bin/dircolors ) then 5 | if ( -r $HOME/.dir_colors ) then 6 | eval `/usr/bin/dircolors -c $HOME/.dir_colors` 7 | else if ( -r /etc/DIR_COLORS ) then 8 | eval `/usr/bin/dircolors -c /etc/DIR_COLORS` 9 | endif 10 | endif 11 | setenv LS_OPTIONS '--color=tty' 12 | if ( ${?LS_COLORS} ) then 13 | if ( "${LS_COLORS}" == "" ) setenv LS_OPTIONS '--color=none' 14 | endif 15 | unalias ls 16 | if ( "$uid" == "0" ) then 17 | setenv LS_OPTIONS "-A -N $LS_OPTIONS -T 0" 18 | else 19 | setenv LS_OPTIONS "-N $LS_OPTIONS -T 0" 20 | endif 21 | alias ls 'ls $LS_OPTIONS' 22 | alias la 'ls -aF --color=none' 23 | alias ll 'ls -l --color=none' 24 | alias l 'll' 25 | alias dir 'ls --format=vertical' 26 | alias vdir 'ls --format=long' 27 | alias d dir; 28 | alias v vdir; 29 | 30 | done: 31 | 32 | -------------------------------------------------------------------------------- /files/usr/bin/old: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # This script simply renames files or directories to -[] 5 | # 6 | # Copyright (c) 1996-2002 SuSE Linux AG, Nuernberg, Germany. 7 | # 8 | # please send bugfixes or comments to http://www.suse.de/feedback. 9 | # 10 | # 11 | # usage - tell user to use program 12 | # 13 | 14 | usage() { 15 | echo usage: "$0" file\|dir [file\|dir ...] 16 | } 17 | 18 | 19 | if [ $# -eq 0 ] ; then 20 | usage 21 | exit 22 | fi 23 | 24 | DATESTRING=`date +"%Y%m%d"` 25 | 26 | for i in "$@" ; do 27 | i=${i%%/} 28 | if [ -e "$i" ] ; then 29 | NEWNAME=$i-$DATESTRING 30 | NUMBER=0 31 | while [ -e "$NEWNAME" ] ; do 32 | NEWNAME=$i-$DATESTRING-$NUMBER 33 | let NUMBER=$NUMBER+1 34 | done 35 | echo moving "$i" to "$NEWNAME" 36 | mv "$i" "$NEWNAME" 37 | else 38 | echo "$i" does not exist. 39 | fi 40 | done 41 | 42 | -------------------------------------------------------------------------------- /files/etc/skel/.inputrc: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | ## ~/.inputrc 3 | ## 4 | ## Control the behaviour of the readline library used e.g. 5 | ## by the bash in the interactive mode for line editing. 6 | ## 7 | ################################################################################ 8 | # 9 | # The bell style used e.g. on error or tab completion, possible values 10 | # are `none', `visible', and `audible' the ringing the bell. 11 | # 12 | #set bell-style none 13 | 14 | # 15 | # If set to on, words which have more than one possible completion without 16 | # any possible partial completion cause the matches to be listed immediately 17 | # instead of ringing the bell. 18 | # 19 | #set show-all-if-unmodified on 20 | 21 | # 22 | # If set to on, words which have more than one possible completion cause the 23 | # matches to be listed immediately instead of ringing the bell. 24 | # 25 | #set show-all-if-ambiguous on 26 | 27 | # 28 | # end 29 | # 30 | -------------------------------------------------------------------------------- /files/usr/share/man/man8/safe-rm.8: -------------------------------------------------------------------------------- 1 | .\" Copyright (C) 2003 SuSE Linux AG 2 | .\"$Id:$ 3 | .TH safe\-rm(dir) 8 4 | .SH NAME 5 | safe\-rm \- delete files a bit more safely 6 | .br 7 | safe\-rmdir \- delete empty directories a bit more safely 8 | .SH SYNOPSIS 9 | \fBsafe\-rm\fR \fI/path/to/file\fR 10 | .br 11 | \fBsafe\-rmdir\fR \fI/path/to/directory\fR 12 | .SH DESCRIPTION 13 | .TP 14 | \fBsafe\-rm\fR deletes files specified with an absolute path 15 | name. Files specified with symbolic links in the 16 | path name will not be erased. 17 | .TP 18 | \fBsafe\-rmdir\fR deletes directories specified with an absolute 19 | path name. Directories specified with symbolic links in the 20 | path name will not be erased. 21 | .SH RETURNS 22 | \fBsafe\-rm\fR and \fBsafe\-rmdir\fR returns a non zero return code 23 | when it can not erase the file safely. 24 | .br 25 | .SH NOTE 26 | These commands are used by the system cleanup cron jobs. 27 | .br 28 | .SH "SEE ALSO" 29 | .BR rm (1), 30 | .BR rmdir (1). 31 | .SH AUTHOR 32 | SuSE Linux AG 33 | -------------------------------------------------------------------------------- /files/usr/bin/safe-rm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | todo= 4 | opts= 5 | case "${0##*/}" in 6 | safe-rm) todo=rm ; opts=-f ;; 7 | safe-rmdir) todo=rmdir ; opts= ;; 8 | esac 9 | 10 | set -o physical 11 | test -n "$todo" || exit 2 12 | test -x /bin/$todo || exit 2 13 | test -x /bin/pwd || exit 2 14 | 15 | for d; do 16 | if [[ "$d" != /* ]] ; then 17 | echo "usage: $0 _absolute_path_to_file" 1>&2 18 | exit 1 19 | fi 20 | path=${d//\/.\//\/} 21 | name=${path##*/} 22 | 23 | if test "/$name" = "$path" ; then 24 | echo "$0: usage in root directory not allowed" 1>&2 25 | exit 1 26 | fi 27 | path=${path%/*} 28 | 29 | if test -z "${path}" ; then 30 | echo "$0: empty dirname not allowed" 1>&2 31 | exit 1 32 | fi 33 | 34 | if cd -P "${path}" && test "${path}" = "$(pwd -P)" ; then 35 | 36 | if test "$PWD" = "$(/bin/pwd)" ; then 37 | /bin/$todo $opts -- "$name" 38 | else 39 | echo "$0: no symlinks allowed in the path of $d" 1>&2 40 | exit 1 41 | fi 42 | 43 | else 44 | echo "$0: no symlinks allowed in the path of $d" 1>&2 45 | exit 1 46 | fi 47 | done 48 | -------------------------------------------------------------------------------- /files/etc/profile.d/xdg-environment.csh: -------------------------------------------------------------------------------- 1 | if ( ! ${?XDG_DATA_DIRS} ) then 2 | set XDG_DATA_DIRS 3 | else 4 | set XDG_DATA_DIRS=(${XDG_DATA_DIRS:as/:/ /}) 5 | endif 6 | set nonomatch 7 | foreach xdgdir (/usr/local/share /usr/share /etc/opt/gnome/share /etc/opt/kde4/share /etc/opt/kde3/share /opt/gnome/share /opt/kde4/share /opt/kde3/share /usr/share/gnome) 8 | if ( -d "$xdgdir" ) then 9 | set -l XDG_DATA_DIRS=($XDG_DATA_DIRS $xdgdir) 10 | endif 11 | end 12 | unset nonomatch 13 | 14 | set xdgdir="${XDG_DATA_DIRS:q}" 15 | unset XDG_DATA_DIRS 16 | setenv XDG_DATA_DIRS "${xdgdir:as/ /:/}" 17 | unset xdgdir 18 | 19 | if ( ! ${?XDG_CONFIG_DIRS} ) then 20 | set XDG_CONFIG_DIRS 21 | else 22 | set XDG_CONFIG_DIRS=(${XDG_CONFIG_DIRS:as/:/ /}) 23 | endif 24 | set nonomatch 25 | foreach xdgdir (/usr/local/etc/xdg /etc/xdg /etc/opt/gnome/xdg /etc/opt/kde4/xdg /etc/opt/kde3/xdg) 26 | if ( -d "$xdgdir" ) then 27 | set -l XDG_CONFIG_DIRS=($XDG_CONFIG_DIRS $xdgdir) 28 | endif 29 | end 30 | unset nonomatch 31 | 32 | set xdgdir="${XDG_CONFIG_DIRS:q}" 33 | unset XDG_CONFIG_DIRS 34 | setenv XDG_CONFIG_DIRS "${xdgdir:as/ /:/}" 35 | unset xdgdir 36 | -------------------------------------------------------------------------------- /files/etc/profile.d/alljava.csh: -------------------------------------------------------------------------------- 1 | # 2 | # /etc/profile.d/alljava.csh 3 | # 4 | # send feedback to http://bugs.opensuse.org 5 | 6 | # 7 | # This script sets some environment variables for default java. 8 | # Affected variables: JAVA_BINDIR, JAVA_HOME, JRE_HOME, 9 | # JDK_HOME, SDK_HOME 10 | # 11 | 12 | foreach JDIR ( "/usr/lib64/jvm" "/usr/lib/jvm" "/usr/java/latest" "/usr/java" ) 13 | 14 | if ( ! -d $JDIR ) continue 15 | 16 | foreach JPATH ( $JDIR $JDIR/java `ls -I 'java' -I 'jre' -d $JDIR/*` $JDIR/jre ) 17 | 18 | if ( ! -x $JPATH/bin/java ) continue 19 | 20 | setenv JAVA_BINDIR $JPATH/bin 21 | setenv JAVA_ROOT $JPATH 22 | setenv JAVA_HOME $JPATH 23 | unset JDK_HOME 24 | unset SDK_HOME 25 | 26 | switch ( $JPATH ) 27 | case *jre*: 28 | setenv JRE_HOME $JPATH 29 | breaksw 30 | default: 31 | setenv JRE_HOME $JPATH/jre 32 | # it is development kit=20 33 | if ( -x $JPATH/bin/javac ) then 34 | setenv JDK_HOME $JPATH 35 | setenv SDK_HOME $JPATH 36 | endif 37 | endsw 38 | end 39 | unset JPATH 40 | end 41 | unset JDIR 42 | -------------------------------------------------------------------------------- /files/usr/sbin/refresh_initrd: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Refresh initrd depending on conditions. 4 | # Currently only the change of /etc/sysconfig/clock is 5 | # honoured but we may add more of conditions. 6 | # 7 | # Author: Werner Fink 8 | # 9 | initrd=$(readlink /boot/initrd) 10 | test -n "$initrd" || exit 0 11 | modules=lib/modules/${initrd#initrd-} 12 | 13 | refresh=no 14 | test /etc/sysconfig/clock -nt $initrd && refresh=yes 15 | test /etc/sysconfig/kernel -nt $initrd && refresh=yes 16 | 17 | while read module ; do 18 | module=${module##*/} 19 | module=${module%.ko} 20 | modconfs=$(grep -lE "[[:blank:]]$module[[:blank:]]" /etc/modprobe.d/*) 21 | for modconf in $modconfs; do 22 | test $modconf -nt $initrd && refresh=yes 23 | break 2 24 | done 25 | done < <(lsinitrd /boot/initrd | grep -E "$modules/.*\.ko") 26 | unset modules module modconfs modconf 27 | 28 | test "$refresh" = yes || exit 0 29 | 30 | modprobe dm_mod --quiet &> /dev/null || true 31 | 32 | line=on 33 | test -e /proc/splash && read line < /proc/splash 34 | line=${line##*: } 35 | 36 | SPLASH=no 37 | [[ $line =~ on ]] && SPLASH=yes 38 | test -e /etc/sysconfig/bootsplash && . /etc/sysconfig/bootsplash 39 | 40 | test $SPLASH = yes && set -- -s auto 41 | exec -a mkinitrd /sbin/mkinitrd ${1+"$@"} 42 | -------------------------------------------------------------------------------- /files/var/adm/fillup-templates/sysconfig.backup: -------------------------------------------------------------------------------- 1 | ## Path: System/Backup 2 | ## Description: 3 | ## Type: string(/var/adm/backup/rpmdb) 4 | ## Default: /var/adm/backup/rpmdb 5 | ## Config: 6 | # 7 | # If you want cron.daily to backup the rpm database, specify a directory 8 | # where the backups will be stored. (This is recommended!) The backups 9 | # will be made every time cron.daily is called and the db has changed. 10 | # Setting the variable to "" disables this feature. 11 | # 12 | RPMDB_BACKUP_DIR="/var/adm/backup/rpmdb" 13 | 14 | ## Type: integer 15 | ## Default: 5 16 | # 17 | # Here you can set the maximum number of backup files for the rpm 18 | # database. 19 | # 20 | MAX_RPMDB_BACKUPS="5" 21 | 22 | ## Type: string 23 | ## Default: /var/adm/backup/sysconfig 24 | # 25 | # If you want cron.daily to backup /etc/rc.config and the files in 26 | # /etc/sysconfig, specify a directory where the backups will be stored. 27 | # (This is recommended!) The backups will be made every time cron.daily is 28 | # called and the the content of those files has changed. 29 | # Setting the variable to "" disables this feature. 30 | # 31 | RCCONFIG_BACKUP_DIR="/var/adm/backup/sysconfig" 32 | 33 | ## Type: integer 34 | ## Default: 5 35 | # 36 | # Here you can set the maximum number of backup files for the rc.config files. 37 | # 38 | MAX_RCCONFIG_BACKUPS="5" 39 | -------------------------------------------------------------------------------- /files/usr/share/man/man8/service.8: -------------------------------------------------------------------------------- 1 | .TH service 8 "Sep 2014" 2 | .SH NAME 3 | service \- run service 4 | .SH SYNOPSIS 5 | service \fBSERVICE\fR \fBACTION\fR [\fBOPTIONS\fR] 6 | .br 7 | service --status-all 8 | .br 9 | service --help | -h 10 | 11 | .SH DESCRIPTION 12 | .PP 13 | The \fBSERVICE\fR parameter specifies a systemd service name to operate on. 14 | The supported values of \fBACTION\fR depend on the specified service. 15 | The actions start, stop, reload, restart, try-restart, force-reload, and status 16 | are forwarded to systemctl, \fBOPTIONS\fR are ignored in that case. 17 | Other actions may be defined in /usr/lib/initscripts/legacy-actions. Legacy 18 | actions are called directly and \fBOPTIONS\fR are passed on the command line. 19 | 20 | The \-\-status-all option displays the status of all loaded service units. 21 | 22 | .SH FILES 23 | /usr/lib/initscripts/legacy-actions 24 | Directory containing System V legacy actions 25 | .BR 26 | 27 | .SH HISTORY 28 | service used to run System V init scripts in a predictable environment. 29 | 30 | .SH USE AS rc* WRAPPER 31 | SUSE Linux distributions used to have convenience symlinks to call 32 | System V init scripts, for example /usr/sbin/rcexample -> 33 | /etc/init.d/example. With the move to systemd the service command 34 | can be used as wrapper for systemctl instead. For example 35 | /usr/sbin/rcexample -> /usr/sbin/service. 36 | 37 | .BR 38 | .SH "SEE ALSO" 39 | chkconfig(8), 40 | systemctl(1) 41 | systemd.service(5) 42 | .BR 43 | -------------------------------------------------------------------------------- /files/var/adm/fillup-templates/sysconfig.proxy: -------------------------------------------------------------------------------- 1 | ## Path: Network/Proxy 2 | ## Description: 3 | ## Type: yesno 4 | ## Default: no 5 | ## Config: kde,profiles 6 | # 7 | # Enable a generation of the proxy settings to the profile. 8 | # This setting allows to turn the proxy on and off while 9 | # preserving the particular proxy setup. 10 | # 11 | PROXY_ENABLED="no" 12 | 13 | ## Type: string 14 | ## Default: "" 15 | # 16 | # Some programs (e.g. lynx, arena and wget) support proxies, if set in 17 | # the environment. 18 | # Example: HTTP_PROXY="http://proxy.provider.de:3128/" 19 | HTTP_PROXY="" 20 | 21 | ## Type: string 22 | ## Default: "" 23 | # 24 | # Some programs (e.g. lynx, arena and wget) support proxies, if set in 25 | # the environment. 26 | # This setting is for https connections 27 | HTTPS_PROXY="" 28 | 29 | ## Type: string 30 | ## Default: "" 31 | # 32 | # Example: FTP_PROXY="http://proxy.provider.de:3128/" 33 | # 34 | FTP_PROXY="" 35 | 36 | ## Type: string 37 | ## Default: "" 38 | # 39 | # Example: GOPHER_PROXY="http://proxy.provider.de:3128/" 40 | # 41 | GOPHER_PROXY="" 42 | 43 | ## Type: string 44 | ## Default: "" 45 | # 46 | # Example: SOCKS_PROXY="socks://proxy.example.com:8080" 47 | # 48 | SOCKS_PROXY="" 49 | 50 | ## Type: string 51 | ## Default: "" 52 | # 53 | # Example: SOCKS5_SERVER="office-proxy.example.com:8881" 54 | # 55 | SOCKS5_SERVER="" 56 | 57 | ## Type: string(localhost) 58 | ## Default: localhost 59 | # 60 | # Example: NO_PROXY="www.me.de, .do.main, localhost" 61 | # 62 | NO_PROXY="localhost, 127.0.0.1" 63 | -------------------------------------------------------------------------------- /mimetypemerge: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | # primitive merger for mime.type files 4 | 5 | my $types; 6 | my $headers; 7 | 8 | for my $file (@ARGV) { 9 | open (IN, $file); 10 | 11 | while (my $line = ) { 12 | chomp($line); 13 | if ($line !~ /^(\#\s+)?[a-z-]+\//) { 14 | push @{$headers->{$file}}, $line; 15 | #print "seeing $line as header\n"; 16 | next; 17 | } 18 | my $enabled = 1; 19 | my @elem = split ('\s+', $line); 20 | if ($elem[0] eq "#") { 21 | $enabled = 0; 22 | shift (@elem); 23 | } 24 | #print "line : ".($enabled ? "" : "# " ).join(',',@elem)."\n"; 25 | my $type = shift (@elem); 26 | if ($enabled) { 27 | push @{$types->{$type}->{'enabled'}}, @elem; 28 | } else { 29 | push @{$types->{$type}->{'disabled'}}, @elem; 30 | } 31 | } 32 | 33 | close (IN); 34 | } 35 | 36 | print join("\n",@{$headers->{$ARGV[-1]}})."\n"; 37 | 38 | sub unify { 39 | my %h = map {$_ => 1} @_; 40 | return grep(delete($h{$_}), @_); 41 | } 42 | 43 | 44 | for my $type (sort keys (%{$types})) { 45 | @{$types->{$type}->{'disabled'}} = unify (@{$types->{$type}->{'disabled'}}) if $types->{$type}->{'disabled'}; 46 | @{$types->{$type}->{'enabled'}} = unify (@{$types->{$type}->{'enabled'}}) if $types->{$type}->{'enabled'}; 47 | } 48 | 49 | for my $type (sort keys (%{$types})) { 50 | printf "%-48s %s\n", "# $type", join(" ",@{$types->{$type}->{'disabled'}}) if $types->{$type}->{'disabled'}; 51 | printf "%-48s %s\n", $type, join(" ",@{$types->{$type}->{'enabled'}}) if $types->{$type}->{'enabled'}; 52 | } 53 | -------------------------------------------------------------------------------- /files/etc/profile.d/alias.ash: -------------------------------------------------------------------------------- 1 | # /etc/profile.d/alias.ash for SUSE Linux 2 | # 3 | # The ash shell does not have an alias builtin in 4 | # therefore we use functions here. This is a seperate 5 | # file because other shells may run into trouble 6 | # if they parse this even if they do not expand. 7 | # 8 | suspend () { local -; set +j; kill -TSTP 0; } 9 | # 10 | # A bug? the builtin bltin is missed and mapped 11 | # to the builtin command. 12 | # 13 | bltin () { command ${1+"$@"}; } 14 | pushd () { 15 | local SAVE=`pwd` 16 | if test -z "$1" ; then 17 | if test -z "$DSTACK" ; then 18 | echo "pushd: directory stack empty." 1>&2 19 | return 1 20 | fi 21 | set $DSTACK 22 | cd $1 || return 23 | shift 1 24 | DSTACK="$@" 25 | else 26 | cd $1 > /dev/null || return 27 | fi 28 | DSTACK="$SAVE $DSTACK" 29 | dirs 30 | } 31 | popd () { 32 | if test -z "$DSTACK"; then 33 | echo "popd: directory stack empty." 1>&2 34 | return 1 35 | fi 36 | set $DSTACK 37 | cd $1 38 | shift 1 39 | DSTACK="$@" 40 | dirs 41 | } 42 | dirs () { echo "`pwd` $DSTACK"; return 0; } 43 | 44 | # 45 | # Set some generic aliase functions 46 | # 47 | alias o='less' 48 | alias ..='cd ../' 49 | alias ...='cd ../../' 50 | alias +='pushd' 51 | alias -='popd' 52 | alias rd='rmdir' 53 | alias md='mkdir -p' 54 | alias you='su - -c "yast2 online_update"' 55 | alias rehash='hash -r' 56 | alias beep='printf "\007"' 57 | alias unmount='echo "Error: Try the command: umount" 1>&2 && false' 58 | 59 | # 60 | # End of /etc/profile.d/alias.ash 61 | # 62 | -------------------------------------------------------------------------------- /files/usr/share/man/man1/smart_agetty.1: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" SuSE man page smart_agetty 3 | .\" Copyright (c) 2010 SuSE Linux Products GmbH, Nuernberg, Germany. 4 | .\" 5 | .\" 6 | .TH smart_agetty 1 "May 18th, 2010" "Version 0.0" "Emulate agetty console" 7 | .\" 8 | .UC 1 9 | .SH NAME 10 | .\" 11 | smart_agetty \- Emulate agetty for a non vga/framebuffer console 12 | .B 13 | .SH SYNOPSIS 14 | .\" 15 | .B smart_agetty [OPTIONS] 16 | .\" 17 | .SH DESCRIPTION 18 | smart_agetty is a wrapper script around agetty. It accepts the following options: 19 | .SH OPTIONS 20 | .IP -i|-h|-L|-m|-n|-w| 21 | Normal getty options. See 22 | .RS 23 | .B $ man 8 agetty 24 | .RE 25 | .RS 26 | for more details. 27 | .RE 28 | .IP GETTYSPEED 29 | The speed of the getty device. 30 | .IP GETTYDEVICE 31 | The used tty device - as listed in /dev. 32 | .IP GETTYTERM 33 | The value to be used for the TERM environment variable. This overrides whatever init(8) may have set, and is inherited by login and the shell. 34 | .SH DIAGNOSTICS 35 | The following diagnostics may be issued on kmsg: 36 | 37 | Can not determine 'getty device' speed. 38 | .RS 39 | stty speed could not autodetect the speed of the given device. 40 | .RE 41 | unhandled stdout 42 | .RS 43 | Autoconsole could not guess the right output console. 44 | .RE 45 | .SH BUGS 46 | Please visit http://bugs.opensuse.org/ to get a guidance on how to submit bugreports. 47 | .SH SEE ALSO 48 | .BR agetty (8) 49 | .SH COPYRIGHT 50 | 2010 SuSE Linux Products GmbH, Nuernberg, Germany. 51 | .SH AUTHOR 52 | Lars Vogdt 53 | -------------------------------------------------------------------------------- /files/etc/profile.d/alias.bash: -------------------------------------------------------------------------------- 1 | # 2 | # Some useful functions 3 | # 4 | if test -z "$restricted" ; then 5 | startx () { 6 | test -x /usr/bin/startx || { 7 | echo "No startx installed" 1>&2 8 | return 1; 9 | } 10 | /usr/bin/startx ${1+"$@"} 2>&1 | tee $HOME/.xsession-errors 11 | } 12 | remount () { /bin/mount -o remount,${1+"$@"} ; } 13 | fi 14 | 15 | # 16 | # Set some generic aliases 17 | # 18 | alias o='less' 19 | alias ..='cd ..' 20 | alias ...='cd ../..' 21 | alias cd..='cd ..' 22 | if test "$is" != "ksh" ; then 23 | alias -- +='pushd .' 24 | alias -- -='popd' 25 | fi 26 | alias rd=rmdir 27 | alias egrep='egrep --color=auto' 28 | alias fgrep='fgrep --color=auto' 29 | alias grep='grep --color=auto' 30 | alias md='mkdir -p' 31 | if test "$is" = "bash" -a ! -x /bin/which -a ! -x /usr/bin/which ; then 32 | # 33 | # Other shells use the which command in path (e.g. ash) or 34 | # their own builtin for the which command (e.g. ksh and zsh). 35 | # 36 | _which () { 37 | local file=$(type -p ${1+"$@"} 2>/dev/null) 38 | if test -n "$file" -a -x "$file"; then 39 | echo "$file" 40 | return 0 41 | fi 42 | hash -r 43 | type -P ${1+"$@"} 44 | } 45 | alias which=_which 46 | fi 47 | alias rehash='hash -r' 48 | alias you='if test "$EUID" = 0 ; then /sbin/yast2 online_update ; else su - -c "/sbin/yast2 online_update" ; fi' 49 | if test "$is" != "ksh" ; then 50 | alias beep='echo -en "\007"' 51 | else 52 | alias beep='echo -en "\x07"' 53 | fi 54 | alias unmount='echo "Error: Try the command: umount" 1>&2; false' 55 | -------------------------------------------------------------------------------- /files/usr/bin/ChangeSymlinks: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | INSTALL=install/doinst.sh 4 | 5 | write_header (){ 6 | if test \! -f $INSTALL ; then 7 | echo "#!/bin/sh" > $INSTALL 8 | echo "#" >> $INSTALL 9 | echo "#" >> $INSTALL 10 | echo "# install/doinst.sh - to be done after extraction" >> $INSTALL 11 | echo "#" >> $INSTALL 12 | echo "# Copyright (c) 1996-2002 SuSE Linux AG, Nuernberg, Germany. " >> $INSTALL 13 | echo "#" >> $INSTALL 14 | echo "#" >> $INSTALL 15 | fi 16 | } 17 | 18 | change_symlink(){ 19 | while read input; do 20 | link=`ls -l $input | awk '{ print $11 }'` 21 | rm -f $input 22 | if test \! -d install; then 23 | mkdir install 24 | fi 25 | write_header 26 | echo "rm -f $input 2>/dev/null || echo $input \$SLDIRERROR >&2" >> $INSTALL 27 | echo "test -e $input || ln -s $link $input" >> $INSTALL 28 | done 29 | return 30 | } 31 | 32 | change_gz_symlink(){ 33 | while read input; do 34 | link=`ls -l $input | awk '{ print $11 }'` 35 | rm -f $input 36 | if test \! -d install; then 37 | mkdir install 38 | fi 39 | write_header 40 | echo "rm -fr ${input}.gz" >> $INSTALL 41 | echo "ln -sf ${link}.gz ${input}.gz" >> $INSTALL 42 | done 43 | return 44 | } 45 | 46 | DIR="usr/man/man? usr/X11R6/man usr/info usr/lib/teTeX/man usr/lib/teTeX/info" 47 | 48 | find $DIR \! -name "*.gz" -type l 2>/dev/null | change_gz_symlink 49 | find $DIR \! -name README \! -name dir \! -name localdir \! -name "*.gz" \ 50 | \! -type d \! -type l -exec gzip -9 \{\} \; 2>/dev/null 51 | find * -type l | change_symlink 52 | 53 | -------------------------------------------------------------------------------- /files/etc/profile.d/xdg-environment.sh: -------------------------------------------------------------------------------- 1 | # uniquefy_search_path (search_path): 2 | # 3 | # Remove duplicate entries from a search path string, preserving order. 4 | uniquefy_search_path () 5 | { 6 | OIFS="$IFS" 7 | IFS=' 8 | ' 9 | set -- $(echo ${1+"$@"} | sed -r 's@/*:|([^\\]):@\1\n@g;H;x;s@/\n@\n@') 10 | IFS="$OIFS" 11 | 12 | _y="" 13 | for _x ; do 14 | case ":${_y}:" in 15 | *:"${_x}":*) continue 16 | esac 17 | _y=${_y:+"$_y:"}${_x} 18 | done 19 | 20 | echo "${_y}" 21 | unset _y _x 22 | } 23 | 24 | setup_xdg_paths() { 25 | if [ "x$ZSH_VERSION" != "x" ] ; then 26 | setopt nullglob localoptions 27 | fi 28 | for xdgdir in /usr/local/share /usr/share /etc/opt/gnome/share /etc/opt/kde4/share /etc/opt/kde3/share /opt/gnome/share /opt/kde4/share /opt/kde3/share /usr/share/gnome ; do 29 | if test -d "$xdgdir" && test -d "$xdgdir/applications"; then 30 | if test -z "$XDG_DATA_DIRS"; then 31 | XDG_DATA_DIRS="$xdgdir" 32 | else 33 | XDG_DATA_DIRS="$XDG_DATA_DIRS:$xdgdir" 34 | fi 35 | fi 36 | done 37 | 38 | XDG_DATA_DIRS=$(uniquefy_search_path "$XDG_DATA_DIRS") 39 | export XDG_DATA_DIRS 40 | 41 | for xdgdir in /usr/local/etc/xdg /etc/xdg /etc/opt/gnome/xdg /etc/opt/kde4/xdg /etc/opt/kde3/xdg ; do 42 | if test -d "$xdgdir"; then 43 | if test -z "$XDG_CONFIG_DIRS"; then 44 | XDG_CONFIG_DIRS="$xdgdir" 45 | else 46 | XDG_CONFIG_DIRS="$XDG_CONFIG_DIRS:$xdgdir" 47 | fi 48 | fi 49 | done 50 | 51 | XDG_CONFIG_DIRS=$(uniquefy_search_path "$XDG_CONFIG_DIRS") 52 | export XDG_CONFIG_DIRS 53 | 54 | unset xdgdir 55 | } 56 | 57 | setup_xdg_paths 58 | -------------------------------------------------------------------------------- /files/etc/profile.d/alljava.sh: -------------------------------------------------------------------------------- 1 | # 2 | # /etc/profile.d/alljava.sh 3 | # 4 | # send feedback to http://bugs.opensuse.org 5 | 6 | # 7 | # This script sets some environment variables for default java. 8 | # Affected variables: JAVA_BINDIR, JAVA_HOME, JRE_HOME, 9 | # JDK_HOME, SDK_HOME 10 | # 11 | 12 | for JDIR in /usr/lib64/jvm /usr/lib/jvm /usr/java/latest /usr/java; do 13 | 14 | if ! test -d $JDIR; then 15 | continue 16 | fi 17 | 18 | for JPATH in $JDIR $JDIR/java `ls -I 'java' -I 'jre' -d $JDIR/* 2>/dev/null` $JDIR/jre; do 19 | 20 | if ! test -x $JPATH/bin/java; then 21 | continue 22 | fi 23 | 24 | export JAVA_BINDIR=$JPATH/bin 25 | export JAVA_ROOT=$JPATH 26 | export JAVA_HOME=$JPATH 27 | unset JDK_HOME 28 | unset SDK_HOME 29 | 30 | case "$JPATH" in 31 | *jre*) 32 | [ -z "$JRE_HOME" ] && export JRE_HOME=$JPATH 33 | ;; 34 | 35 | *) 36 | [ -z "$JRE_HOME" ] && export JRE_HOME=$JPATH/jre 37 | # it is development kit 38 | if [ -x $JPATH/bin/javac ] ; then 39 | export JDK_HOME=$JPATH 40 | export SDK_HOME=$JPATH 41 | unset JPATH 42 | break 2; # we found a JRE + SDK -- don't look any further 43 | fi 44 | ;; 45 | esac 46 | 47 | done 48 | unset JPATH 49 | 50 | done 51 | unset JDIR 52 | -------------------------------------------------------------------------------- /files/etc/skel/.emacs: -------------------------------------------------------------------------------- 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 | ;;; File name: ` ~/.emacs ' 3 | ;;; --------------------- 4 | ;;; 5 | ;;; If you need your own personal ~/.emacs 6 | ;;; please make a copy of this file 7 | ;;; an placein your changes and/or extension. 8 | ;;; 9 | ;;; Copyright (c) 1997-2002 SuSE Gmbh Nuernberg, Germany. 10 | ;;; 11 | ;;; Author: Werner Fink, 1997,98,99,2002 12 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 13 | ;;; 14 | ;;; Test of Emacs derivates 15 | ;;; ----------------------- 16 | (if (string-match "XEmacs\\|Lucid" emacs-version) 17 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 18 | ;;; XEmacs 19 | ;;; ------ 20 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 21 | (progn 22 | (if (file-readable-p "~/.xemacs/init.el") 23 | (load "~/.xemacs/init.el" nil t)) 24 | ) 25 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 26 | ;;; GNU-Emacs 27 | ;;; --------- 28 | ;;; load ~/.gnu-emacs or, if not exists /etc/skel/.gnu-emacs 29 | ;;; For a description and the settings see /etc/skel/.gnu-emacs 30 | ;;; ... for your private ~/.gnu-emacs your are on your one. 31 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 32 | (if (file-readable-p "~/.gnu-emacs") 33 | (load "~/.gnu-emacs" nil t) 34 | (if (file-readable-p "/etc/skel/.gnu-emacs") 35 | (load "/etc/skel/.gnu-emacs" nil t))) 36 | 37 | ;; Custom Settings 38 | ;; =============== 39 | ;; To avoid any trouble with the customization system of GNU emacs 40 | ;; we set the default file ~/.gnu-emacs-custom 41 | (setq custom-file "~/.gnu-emacs-custom") 42 | (load "~/.gnu-emacs-custom" t t) 43 | ;;; 44 | ) 45 | ;;; 46 | -------------------------------------------------------------------------------- /files/etc/profile.d/ls.bash: -------------------------------------------------------------------------------- 1 | case "$-" in 2 | *i*) 3 | # 4 | # Colored file listings 5 | # 6 | if test -x /usr/bin/dircolors ; then 7 | # 8 | # set up the color-ls environment variables: 9 | # 10 | if test -f $HOME/.dir_colors ; then 11 | eval "`/usr/bin/dircolors -b $HOME/.dir_colors`" 12 | elif test -f /etc/DIR_COLORS ; then 13 | eval "`/usr/bin/dircolors -b /etc/DIR_COLORS`" 14 | fi 15 | fi 16 | 17 | # 18 | # ls color option depends on the terminal 19 | # If LS_COLORS is set but empty, the terminal has no colors. 20 | # 21 | if test "${LS_COLORS+empty}" = "${LS_COLORS:+empty}" ; then 22 | LS_OPTIONS=--color=tty 23 | else 24 | LS_OPTIONS=--color=none 25 | fi 26 | if test "$UID" = 0 ; then 27 | LS_OPTIONS="-A -N $LS_OPTIONS -T 0" 28 | else 29 | LS_OPTIONS="-N $LS_OPTIONS -T 0" 30 | fi 31 | 32 | # 33 | # Avoid trouble with Emacs shell mode 34 | # 35 | if test "$EMACS" = "t" ; then 36 | LS_OPTIONS='-N --color=none -T 0'; 37 | fi 38 | export LS_OPTIONS 39 | 40 | # 41 | # useful ls aliases 42 | # 43 | if test "$is" != "ash" ; then 44 | unalias ls 2>/dev/null 45 | fi 46 | case "$is" in 47 | bash|dash|ash) 48 | _ls () 49 | { 50 | local IFS=' ' 51 | command ls $LS_OPTIONS ${1+"$@"} 52 | } 53 | alias ls=_ls 54 | ;; 55 | zsh) 56 | test -s /etc/profile.d/ls.zsh && . /etc/profile.d/ls.zsh 57 | ;; 58 | ksh) 59 | _ls () 60 | { 61 | typeset IFS=' ' 62 | command ls $LS_OPTIONS ${1+"$@"} 63 | } 64 | alias ls=_ls 65 | ;; 66 | *) alias ls='/bin/ls $LS_OPTIONS' ;; 67 | esac 68 | alias dir='ls -l' 69 | alias ll='ls -l' 70 | alias la='ls -la' 71 | alias l='ls -alF' 72 | alias ls-l='ls -l' 73 | ;; 74 | esac 75 | -------------------------------------------------------------------------------- /files/usr/lib/sysctl.d/50-default.conf: -------------------------------------------------------------------------------- 1 | # 2 | # Distribution defaults. 3 | # Use /etc/sysctl.conf to override. 4 | # 5 | # Disable response to broadcast pings to avoid smurf attacks. 6 | net.ipv4.icmp_echo_ignore_broadcasts = 1 7 | 8 | # enable route verification on all interfaces 9 | net.ipv4.conf.all.rp_filter = 1 10 | 11 | # avoid deleting secondary IPs on deleting the primary IP 12 | net.ipv4.conf.default.promote_secondaries = 1 13 | net.ipv4.conf.all.promote_secondaries = 1 14 | 15 | # disable IPv6 completely 16 | #net.ipv6.conf.all.disable_ipv6 = 1 17 | 18 | # enable IPv6 forwarding 19 | #net.ipv6.conf.all.forwarding = 1 20 | 21 | # enable IPv6 privacy but do not use the temporary 22 | # addresses for outgoing connections by default 23 | # (bsc#678066,bsc#752842,bsc#988023,bsc#990838) 24 | net.ipv6.conf.default.use_tempaddr = 1 25 | 26 | # increase the number of possible inotify(7) watches 27 | fs.inotify.max_user_watches = 65536 28 | 29 | # Magic SysRq Keys enable some control over the system even if it 30 | # crashes (e.g. during kernel debugging). 31 | # 32 | # 0 - disable sysrq completely 33 | # 1 - enable all functions of sysrq 34 | # >1 - bitmask of allowed sysrq functions: 35 | # 2 - enable control of console logging level 36 | # 4 - enable control of keyboard (SAK, unraw) 37 | # 8 - enable debugging dumps of processes etc. 38 | # 16 - enable sync command 39 | # 32 - enable remount read-only 40 | # 64 - enable signalling of processes (term, kill, oom-kill) 41 | # 128 - allow reboot/poweroff 42 | # 256 - allow nicing of all RT tasks 43 | # 44 | # For further information see /usr/src/linux/Documentation/sysrq.txt 45 | # default 184 = 128+32+16+8 46 | kernel.sysrq = 184 47 | 48 | # Disable auto-closing of cd tray bnc#659153 49 | dev.cdrom.autoclose = 0 50 | 51 | # enable hard- and symlink protection (bnc#821585) 52 | fs.protected_hardlinks = 1 53 | fs.protected_symlinks = 1 54 | 55 | # restrict printed kernel ptrs (bnc#833774) 56 | kernel.kptr_restrict = 1 57 | -------------------------------------------------------------------------------- /obs/mkpackage: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | shopt -s nullglob 4 | name="`pwd -P`" 5 | name=${name##*/} 6 | name=${name%%.*} 7 | branch=`git rev-parse --abbrev-ref HEAD` 8 | pkgdir="$name" 9 | [ "$branch" = "master" ] || pkgdir="$pkgdir.$branch" 10 | src="$PWD" 11 | if [ ! -d "$pkgdir/.osc" ]; then 12 | echo "*** Error: please check out the package:" 13 | echo "osc branch openSUSE:Factory $name" 14 | echo "ln -s home\:*\:branches\:*/$name $pkgdir" 15 | exit 1 16 | fi 17 | if [ "`git --no-pager diff --name-only|wc -l`" != '0' -o "`git --no-pager diff --name-only --cached|wc -l`" != 0 ]; then 18 | echo "*** Error: uncomitted changes" 19 | echo "run 'git add file' to add files, 'git commit -a' to commit changes" 20 | exit 1 21 | fi 22 | cd "$pkgdir" 23 | echo "osc up" 24 | osc up 25 | cd "$src" 26 | "$src"/obs/mkchanges "$pkgdir/$name".changes | tee "$pkgdir"/.changes 27 | #test ! -s $pkgdir/.changes || git push 28 | for i in *.xz; do 29 | /bin/rm -vi "$i" 30 | done 31 | eval `"$src"/obs/mktar` 32 | mv "$src/$FILENAME" "$pkgdir" 33 | cd "$pkgdir" 34 | osc add "$FILENAME" 35 | if [ -n "$VERSION" ]; then 36 | read oldver < <(/usr/lib/build/spectool --tag "version" "$name".spec) 37 | oldver="${oldver/*: /}" 38 | while read sourcefile; do 39 | sourcefile="${sourcefile/*: /}" 40 | [ -n "$sourcefile" ] || continue 41 | [ "$sourcefile" != "${sourcefile#$name-$oldver}" ] || continue 42 | if [ -e "$sourcefile" ]; then 43 | osc rm -f "$sourcefile" || true 44 | fi 45 | done < <(/usr/lib/build/spectool --tag "/source0?/" "$name".spec) 46 | sed -i -e "0,/^Version: /{s/^\(Version: *\).*/\1$VERSION/;}" "$name".spec 47 | fi 48 | osc vc "$name".changes .changes && rm -f .changes 49 | cd "$src" 50 | if [ -n "`git rev-list remotes/origin/master..HEAD`" ]; then 51 | pushed= 52 | if [ "$branch" != "master" ]; then 53 | echo "Warning: not on master branch" 54 | fi 55 | if read -p "push changes now? (Y/n) "; then 56 | if [ -z "$REPLY" -o "${REPLY#y}" != "$REPLY" ]; then 57 | git push origin $branch && pushed=1 || true 58 | fi 59 | fi 60 | if [ -z "$pushed" ]; then 61 | echo "*** Warning: changes not pushed!" 62 | else 63 | cd "$pkgdir" 64 | osc ci 65 | fi 66 | fi 67 | -------------------------------------------------------------------------------- /files/etc/cron.daily/suse.de-backup-rc.config: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # 4 | # backup_rc.config. 5 | # 6 | # Copyright (c) 1996-2002 SuSE Linux AG, Nuernberg, Germany. 7 | # 8 | # please send bugfixes or comments to http://www.suse.de/feedback. 9 | # 10 | # paranoia settings 11 | # 12 | umask 022 13 | 14 | PATH=/sbin:/bin:/usr/sbin:/usr/bin 15 | export PATH 16 | 17 | # 18 | # get information from /etc/sysconfig 19 | # 20 | if [ -f /etc/sysconfig/backup ] ; then 21 | . /etc/sysconfig/backup 22 | fi 23 | 24 | # 25 | # create backups archive of sysconfig files 26 | # 27 | if test -n "$RCCONFIG_BACKUP_DIR" -a -e /etc/sysconfig ; then 28 | mkdir -p $RCCONFIG_BACKUP_DIR 29 | OLD_MD5="" 30 | ETC_RCCONFIG="" 31 | test -f /etc/rc.config && ETC_RCCONFIG="/etc/rc.config" 32 | test -e $RCCONFIG_BACKUP_DIR/sysconfig_recent_md5 && \ 33 | OLD_MD5="`cat $RCCONFIG_BACKUP_DIR/sysconfig_recent_md5`" 34 | NEW_MD5="`find $ETC_RCCONFIG /etc/sysconfig -type f -exec cat {} \+ | md5sum`" 35 | if test "$OLD_MD5" != "$NEW_MD5" ; then 36 | DATESTRING=`date +"%Y%m%d"` 37 | 38 | NEWNAME=$RCCONFIG_BACKUP_DIR/sysconfig-$DATESTRING.tar.gz 39 | NUMBER=2 40 | while [ -e $NEWNAME ] ; do 41 | NEWNAME=$RCCONFIG_BACKUP_DIR/sysconfig-$DATESTRING-$NUMBER.tar.gz 42 | NUMBER=`expr $NUMBER + 1` 43 | done 44 | 45 | if tar czfp $NEWNAME $ETC_RCCONFIG /etc/sysconfig 2>/dev/null ; then 46 | echo "$NEW_MD5" > $RCCONFIG_BACKUP_DIR/sysconfig_recent_md5 47 | test "$MAX_RCCONFIG_BACKUPS" -gt 0 2> /dev/null || MAX_RCCONFIG_BACKUPS=0 48 | NUMBER=1 49 | for BACKUPFILE in `ls -1 -t $RCCONFIG_BACKUP_DIR/sysconfig-*` ; do 50 | if test "$NUMBER" -gt "$MAX_RCCONFIG_BACKUPS" ; then 51 | rm -f $BACKUPFILE 52 | fi 53 | NUMBER=`expr $NUMBER + 1` 54 | done 55 | else 56 | echo "ERROR!! can not backup sysconfig files" 57 | echo "to $RCCONFIG_BACKUP_DIR." 58 | echo "Maybe there is not enough disk space." 59 | rm -f $NEWNAME 60 | fi 61 | fi 62 | fi 63 | 64 | exit 0 65 | -------------------------------------------------------------------------------- /files/usr/share/man/man5/defaultdomain.5: -------------------------------------------------------------------------------- 1 | .\" Copyright (c) 2002 SuSE Linux AG Nuernberg, Germany. 2 | .\" 3 | .\" Author: Thorsten Kukuk (http://www.suse.de/feedback) 4 | .\" 5 | .\" This is free documentation; you can redistribute it and/or 6 | .\" modify it under the terms of the GNU General Public License 7 | .\" version 2 as published by the Free Software Foundation. 8 | .\" 9 | .\" The GNU General Public License's references to "object code" 10 | .\" and "executables" are to be interpreted as the output of any 11 | .\" document formatting or typesetting system, including 12 | .\" intermediate and printed output. 13 | .\" 14 | .\" This manual is distributed in the hope that it will be useful, 15 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | .\" GNU General Public License for more details. 18 | .\" 19 | .\" You should have received a copy of the GNU General Public 20 | .\" License along with this manual; if not, write to the Free 21 | .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, 22 | .\" USA. 23 | .\" 24 | .TH DEFAULTDOMAIN 5 2002-01-16 "SuSE Linux" "Linux Programmer's Manual" 25 | .SH NAME 26 | defaultdomain \- file which contains the NIS/YP domain name 27 | .SH DESCRIPTION 28 | \fB/etc/defaultdomain\fP is used by the boot scripts to set 29 | the NIS/YP domain name for a system as returned by the 30 | .BR getdomainname (2) 31 | function. The file contains one line with the name of the domain. 32 | 33 | .LP 34 | Unlike DNS hostnames and domain names, the NIS domain name is 35 | case-sensitive! The NIS domain name must not be the same as the 36 | DNS domain name, but for some services like NIS+ it should be the 37 | same. 38 | 39 | .LP 40 | Even if the domain name is often called NIS/YP domain name, it is 41 | also used from other protocols, not only NIS/YP. 42 | .SH FILES 43 | /etc/defaultdomain 44 | /etc/init.d/boot.localnet 45 | .SH "SEE ALSO" 46 | .BR domainname (1), 47 | .BR init.d (7), 48 | .BR init (8), 49 | .BR nisdomainname (1), 50 | .BR ypdomainname (1), 51 | .BR ypbind (8), 52 | .BR ypserv (8), 53 | .BR ypwhich (1) 54 | .SH COPYRIGHT 55 | 2002 SuSE Linux AG Nuernberg, Germany. 56 | -------------------------------------------------------------------------------- /files/etc/cron.daily/suse.de-backup-rpmdb: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # 4 | # backup_rpmdb. This script was split off cron.daily 5 | # Please add your local changes to cron.daily.local 6 | # since this file will be overwritten, when updating your system. 7 | # 8 | # Copyright (c) 1996-2002 SuSE Linux AG, Nuernberg, Germany. 9 | # 10 | # please send bugfixes or comments to http://www.suse.de/feedback. 11 | # 12 | # Author: Burchard Steinbild, 1996 13 | # Florian La Roche, 1996 14 | # 15 | # 16 | # paranoia settings 17 | # 18 | umask 022 19 | 20 | PATH=/sbin:/bin:/usr/sbin:/usr/bin 21 | export PATH 22 | 23 | # 24 | # get information from /etc/sysconfig 25 | # 26 | if [ -f /etc/sysconfig/backup ] ; then 27 | . /etc/sysconfig/backup 28 | fi 29 | # 30 | # 31 | PACKAGEDBFILE=packages.rpm 32 | if test -e /var/lib/rpm/Packages ; then 33 | PACKAGEDBFILE=Packages 34 | fi 35 | # 36 | # create backups of rpm data base 37 | # 38 | if test -n "$RPMDB_BACKUP_DIR" -a -e /var/lib/rpm/$PACKAGEDBFILE ; then 39 | mkdir -p $RPMDB_BACKUP_DIR 40 | OLD_MD5="" 41 | test -e $RPMDB_BACKUP_DIR/rpmdb_recent_md5 && \ 42 | OLD_MD5="`cat $RPMDB_BACKUP_DIR/rpmdb_recent_md5`" 43 | NEW_MD5="`cat /var/lib/rpm/$PACKAGEDBFILE | md5sum`" 44 | if test "$OLD_MD5" != "$NEW_MD5" ; then 45 | DATESTRING=`date +"%Y%m%d"` 46 | 47 | NEWNAME=$RPMDB_BACKUP_DIR/$PACKAGEDBFILE-$DATESTRING 48 | NUMBER=2 49 | while [ -e $NEWNAME -o -e $NEWNAME.gz ] ; do 50 | NEWNAME=$RPMDB_BACKUP_DIR/$PACKAGEDBFILE-$DATESTRING-$NUMBER 51 | NUMBER=`expr $NUMBER + 1` 52 | done 53 | 54 | if gzip -9 < /var/lib/rpm/$PACKAGEDBFILE > $NEWNAME.gz; then 55 | echo "$NEW_MD5" > $RPMDB_BACKUP_DIR/rpmdb_recent_md5 56 | test "$MAX_RPMDB_BACKUPS" -gt 0 2> /dev/null || MAX_RPMDB_BACKUPS=0 57 | NUMBER=1 58 | for BACKUPFILE in `ls -1 -t $RPMDB_BACKUP_DIR/$PACKAGEDBFILE-*` ; do 59 | if test "$NUMBER" -gt "$MAX_RPMDB_BACKUPS" ; then 60 | rm -f $BACKUPFILE 61 | fi 62 | NUMBER=`expr $NUMBER + 1` 63 | done 64 | else 65 | echo "ERROR!! can not backup RPM Database to $RPMDB_BACKUP_DIR." 66 | echo "Maybe there is not enough disk space." 67 | rm -f $NEWNAME $NEWNAME.gz 68 | fi 69 | fi 70 | fi 71 | 72 | exit 0 73 | -------------------------------------------------------------------------------- /files/etc/profile.d/lang.sh: -------------------------------------------------------------------------------- 1 | # 2 | # lang.sh: Set interactive language environment 3 | # 4 | # Used configuration files: 5 | # 6 | # /etc/sysconfig/language 7 | # $HOME/.i18n 8 | # 9 | 10 | # 11 | # Already done by the remote SSH side 12 | # 13 | test -z "$SSH_SENDS_LOCALE" || return 14 | 15 | # 16 | # Already done by the GDM 17 | # 18 | if test -n "$GDM_LANG" ; then 19 | eval $(sed -rn -e 's/^(RC_LANG)=/_\1=/p' < /etc/sysconfig/language) 20 | if test "$_RC_LANG" = "$GDM_LANG" ; then 21 | unset GDM_LANG 22 | else 23 | LANG=$GDM_LANG 24 | fi 25 | unset _RC_LANG 26 | fi 27 | 28 | unset _save 29 | test -n "$LANG" && _save="$LANG" 30 | 31 | # 32 | # Get the system and after that the users configuration 33 | # 34 | if test -s /etc/sysconfig/language ; then 35 | while read line ; do 36 | case "$line" in 37 | \#*|"") 38 | continue 39 | ;; 40 | RC_*) 41 | # Allow GDM to override system settings 42 | test -n "$GDM_LANG" && continue 43 | eval ${line#RC_} 44 | ;; 45 | ROOT_USES_LANG*) 46 | test "$UID" = 0 && eval $line || ROOT_USES_LANG=yes 47 | ;; 48 | esac 49 | done < /etc/sysconfig/language 50 | unset line 51 | fi 52 | test -s $HOME/.i18n && . $HOME/.i18n 53 | 54 | test -n "$_save" && LANG="$_save" 55 | unset _save 56 | 57 | # 58 | # Handle all LC and the LANG variable 59 | # 60 | for lc in LANG LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE \ 61 | LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES \ 62 | LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ 63 | LC_TELEPHONE LC_TIME 64 | do 65 | eval val="\$$lc" 66 | if test "$ROOT_USES_LANG" = "yes" ; then 67 | if test -z "$val" ; then 68 | eval unset $lc 69 | else 70 | eval $lc=\$val 71 | eval export $lc 72 | fi 73 | elif test "$ROOT_USES_LANG" = "ctype" ; then 74 | test "$lc" = "LANG" && continue 75 | if test "$lc" = "LC_CTYPE" ; then 76 | LC_CTYPE=$LANG 77 | LANG=POSIX 78 | export LANG LC_CTYPE 79 | else 80 | eval unset $lc 81 | fi 82 | else 83 | if test "$lc" = "LANG" ; then 84 | LANG=POSIX 85 | export LANG 86 | else 87 | eval unset $lc 88 | fi 89 | fi 90 | done 91 | 92 | unset lc val 93 | unset ROOT_USES_LANG 94 | 95 | # 96 | # Special LC_ALL handling because the LC_ALL 97 | # overwrites all LC but not the LANG variable 98 | # 99 | if test -n "$LC_ALL" -a "$LC_ALL" != "$LANG" ; then 100 | export LC_ALL 101 | else 102 | unset LC_ALL 103 | fi 104 | 105 | # 106 | # end of lang.sh 107 | -------------------------------------------------------------------------------- /files/usr/sbin/smart_agetty: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # emulate: /sbin/agetty -L $speed console for console != vga/framebuffer console 3 | 4 | #echo "$0: called with '$*'" > /dev/kmsg 5 | 6 | stop_me () { 7 | kill -STOP $$ 8 | exit 1 9 | } 10 | 11 | kernel_console= 12 | getty_options= 13 | getty_device= 14 | getty_speed= 15 | getty_TERM= 16 | 17 | until [ "$#" = "0" ] ; do 18 | case "$1" in 19 | -i|-h|-L|-m|-n|-w) 20 | getty_options="$getty_options $1" 21 | shift 22 | ;; 23 | -*) 24 | getty_options="$getty_options $1 $2" 25 | shift 2 26 | ;; 27 | *) 28 | case "$1" in 29 | [0-9]*) 30 | getty_speed=$1 31 | getty_device=$2 32 | ;; 33 | *) 34 | getty_speed=$2 35 | getty_device=$1 36 | ;; 37 | esac 38 | getty_TERM=$3 39 | break 40 | ;; 41 | esac 42 | done 43 | 44 | getty_speed=`stty speed < /dev/$getty_device` 45 | 46 | if test -z "$getty_speed" 47 | then 48 | echo "${0}: can not determine '$getty_device' speed" > /dev/kmsg 49 | stop_me 50 | exit 1 51 | fi 52 | 53 | guess_powerpc_autoconsole() { 54 | local prop 55 | if test -f /proc/device-tree/chosen/linux,stdout-path 56 | then 57 | prop=`cat /proc/device-tree/chosen/linux,stdout-path` 58 | prop="${prop##*/}" 59 | case "$prop" in 60 | display@*) echo tty1 ;; 61 | serial@3f8) echo ttyS0 ;; # maple 62 | serial@i3f8) echo ttyS0 ;; 63 | serial@i2f8) echo ttyS1 ;; 64 | serial@i898) echo ttyS2 ;; 65 | serial@i890) echo ttyS3 ;; 66 | vty@0) echo hvc0 ;; 67 | vty@30000000) echo hvsi0 ;; 68 | vty@30000001) echo hvsi1 ;; 69 | # some Exar and Jasmine PCI cards have serial@[0123] 70 | # but since its pci, the ttyS# number cant be guessed 71 | serial@0) echo ttyS0 ;; 72 | *) echo "$0: unhandled stdout '$prop'" > /dev/kmsg ;; 73 | esac 74 | fi 75 | } 76 | 77 | if test "$getty_device" = "console" 78 | then 79 | read kernel_cmdline < /proc/cmdline 80 | for i in $kernel_cmdline '' 81 | do 82 | case "$i" in 83 | console=*) 84 | kernel_console="${i#*=}" 85 | kernel_console="${kernel_console%%,*}" 86 | ;; 87 | esac 88 | done 89 | if test -z "$kernel_console" 90 | then 91 | # check SUSE TIOCGDEV, remove /dev/ 92 | kernel_console="`showconsole < /dev/console`" 93 | kernel_console="${kernel_console##*/}" 94 | fi 95 | if test -z "$kernel_console" 96 | then 97 | kernel_console="`guess_powerpc_autoconsole`" 98 | fi 99 | case "$kernel_console" in 100 | tty[0-9]*) 101 | stop_me 102 | exit 1 103 | ;; 104 | esac 105 | fi 106 | 107 | exec /sbin/agetty $getty_options $getty_speed $getty_device $getty_TERM 108 | -------------------------------------------------------------------------------- /files/etc/inputrc: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | ## /etc/inputrc 3 | ## 4 | ## Attempt to put different TERMs together in one readline init file. 5 | ## Copyright (c) 1997,2000,2002 SuSE Linux AG, Nuernberg, Germany. 6 | ## Copyright: 2007 SuSE LINUX Products GmbH, Nuernberg, Germany. 7 | ## 8 | ## Author: Werner Fink 9 | ## Please send feedback to http://www.suse.de/feedback 10 | ## 11 | ################################################################################ 12 | # 13 | # Eight bit compatible: Umlaute 14 | # 15 | set meta-flag on 16 | set input-meta on 17 | set output-meta on 18 | set convert-meta off 19 | set enable-meta-key off 20 | # 21 | # When enabled use application keypad, with XTerm the e.g. Up key switch from 22 | # ESC [ A over to ESC O A . On the bash command prompt the commands 23 | # tput smkx 24 | # for enter keyboard_transmit mode as well as 25 | # tput rmkx 26 | # for leave keyboard_transmit mode can be used to sitch to application keypad 27 | # and switch back 28 | # 29 | #$if Bash 30 | #set enable-keypad on 31 | #$endif 32 | # 33 | # VI line editing 34 | # 35 | # All mappings below the following line belongs to vi-command mode 36 | set keymap vi-command 37 | # Common standard keypad and cursor 38 | $include /etc/inputrc.keys 39 | # 40 | # All mappings below the following line belongs to vi-insert mode 41 | set keymap vi-insert 42 | # Common standard keypad and cursor 43 | $include /etc/inputrc.keys 44 | # 45 | # EMACS line editing 46 | # 47 | $if mode=emacs 48 | set keymap emacs 49 | # Common standard keypad and cursor 50 | $include /etc/inputrc.keys 51 | # 52 | # ... xterm application cursor 53 | # 54 | $if term=xterm 55 | "\e\eOD": backward-word 56 | "\e\eOC": forward-word 57 | "\e\eOA": up-history 58 | "\e\eOB": down-history 59 | "\C-\eOD": backward-char 60 | "\C-\eOC": forward-char 61 | "\C-\eOA": up-history 62 | "\C-\eOB": down-history 63 | "\M-\eOD": backward-word 64 | "\M-\eOC": forward-word 65 | "\M-\eOA": up-history 66 | "\M-\eOB": down-history 67 | "\C-\M-OD": backward-char 68 | "\C-\M-OC": forward-char 69 | "\C-\M-OA": up-history 70 | "\C-\M-OB": down-history 71 | $endif 72 | # 73 | # Standard cursor 74 | # 75 | "\e\e[D": backward-word 76 | "\e\e[C": forward-word 77 | "\e\e[A": up-history 78 | "\e\e[B": down-history 79 | "\C-\e[D": backward-char 80 | "\C-\e[C": forward-char 81 | "\C-\e[A": up-history 82 | "\C-\e[B": down-history 83 | "\M-\e[D": backward-word 84 | "\M-\e[C": forward-word 85 | "\M-\e[A": up-history 86 | "\M-\e[B": down-history 87 | "\C-\M-[D": backward-char 88 | "\C-\M-[C": forward-char 89 | "\C-\M-[A": up-history 90 | "\C-\M-[B": down-history 91 | $endif 92 | # 93 | # end 94 | # 95 | -------------------------------------------------------------------------------- /files/etc/profile.d/lang.csh: -------------------------------------------------------------------------------- 1 | # 2 | # lang.csh: Set interactive language environment 3 | # 4 | # Used configuration files: 5 | # 6 | # /etc/sysconfig/language 7 | # $HOME/.i18n 8 | # 9 | 10 | # 11 | # Already done by the remote SSH side 12 | # 13 | if ( ${?SSH_SENDS_LOCALE} ) goto end 14 | 15 | # 16 | # Already done by the GDM 17 | # 18 | if ( ${?GDM_LANG} ) then 19 | eval `sed -rn -e 's/^(RC_LANG)=/set _\1=/p' < /etc/sysconfig/language` 20 | if ( ${?_RC_LANG} ) then 21 | if ( "$_RC_LANG" == "$GDM_LANG" ) then 22 | unsetenv GDM_LANG 23 | else 24 | setenv LANG $GDM_LANG 25 | endif 26 | unset _RC_LANG 27 | endif 28 | endif 29 | 30 | unset _save 31 | if ( ${?LANG} ) then 32 | set _save=$LANG 33 | endif 34 | 35 | # 36 | # Get the system and after that the users configuration 37 | # 38 | if ( -s /etc/sysconfig/language ) then 39 | foreach line ("`sed -rn '/^[^#]/p' < /etc/sysconfig/language`") 40 | switch ("$line") 41 | case RC_*: 42 | # Allow GDM to override system settings 43 | if ( ${?GDM_LANG} ) continue 44 | eval set ${line:s/RC_//} 45 | breaksw 46 | case ROOT_USES_LANG*: 47 | if ( "$uid" == 0 ) then 48 | eval set $line 49 | else 50 | set ROOT_USES_LANG=yes 51 | endif 52 | breaksw 53 | default: 54 | breaksw 55 | endsw 56 | end 57 | unset line 58 | endif 59 | if ( -s $HOME/.i18n ) then 60 | eval `sed -rn -e 's/^((LANG|LC_[A-Z_]+))=/set \1=/p' < $HOME/.i18n` 61 | endif 62 | if ( ${?_save} ) then 63 | set LANG=$_save 64 | unset _save 65 | endif 66 | 67 | # 68 | # Handle all LC and the LANG variable 69 | # 70 | foreach lc (LANG LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE \ 71 | LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES \ 72 | LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ 73 | LC_TELEPHONE LC_TIME ) 74 | eval set val=\${\?$lc} 75 | if ( $val == 0 ) continue 76 | eval set val=\$$lc 77 | if ( "$ROOT_USES_LANG" == "yes" ) then 78 | if ( ${%val} == 0 ) then 79 | eval unsetenv $lc 80 | else 81 | eval setenv $lc $val 82 | endif 83 | else if ( "$ROOT_USES_LANG" == "ctype" ) then 84 | if ( "$lc" == "LANG" ) continue 85 | if ( "$lc" == "LC_CTYPE" ) then 86 | setenv LC_CTYPE $LANG 87 | setenv LANG POSIX 88 | else 89 | eval unsetenv $lc 90 | endif 91 | else 92 | if ( "$lc" == "LANG" ) then 93 | setenv LANG POSIX 94 | else 95 | eval unsetenv $lc 96 | endif 97 | endif 98 | eval unset $lc 99 | end 100 | unset lc val 101 | unset ROOT_USES_LANG 102 | 103 | # 104 | # Special LC_ALL handling because the LC_ALL 105 | # overwrites all LC but not the LANG variable 106 | # 107 | if ( ${?LC_ALL} ) then 108 | set LC_ALL=$LC_ALL 109 | if ( ${%LC_ALL} > 0 && "$LC_ALL" != "$LANG" ) then 110 | setenv LC_ALL $LC_ALL 111 | else 112 | unsetenv LC_ALL 113 | endif 114 | unset LC_ALL 115 | endif 116 | 117 | end: 118 | # 119 | # end of lang.sh 120 | -------------------------------------------------------------------------------- /files/etc/rc.splash: -------------------------------------------------------------------------------- 1 | # /etc/rc.splash 2 | # vim: syntax=sh 3 | # 4 | # Initialize bootsplash progressbar variables and 5 | # define the bootsplash boot script functions. 6 | # 7 | 8 | SPLASHCFG= 9 | SPLASH=yes 10 | SPLASHNUM=0 11 | THEME= 12 | export SPLASHCFG SPLASH 13 | 14 | test -s /etc/sysconfig/bootsplash && . /etc/sysconfig/bootsplash 15 | test -x /sbin/splash -a -w /proc/splash || SPLASH=no 16 | test -n "$THEME" -a -d "/etc/bootsplash/themes/$THEME" || SPLASH=no 17 | case "$PREVLEVEL-$RUNLEVEL" in 18 | [2-5]-[2-5]) SPLASH=no 19 | esac 20 | 21 | if test "$SPLASH" = yes -a -r /proc/splash ; then 22 | read -t 1 splashstatus < /proc/splash 23 | splashstatus="${splashstatus#*:}" 24 | splashstatus="${splashstatus## }" 25 | test "$splashstatus" = on || SPLASH=no 26 | unset splashstatus 27 | else 28 | SPLASH=no 29 | fi 30 | 31 | if test "$SPLASH" = yes -a -x /sbin/fbresolution ; then 32 | fbresolution="$(/sbin/fbresolution 2> /dev/null)" 33 | SPLASHCFG="/etc/bootsplash/themes/$THEME/config/bootsplash-${fbresolution}.cfg" 34 | unset fbresolution 35 | test -f "$SPLASHCFG" || SPLASH=no 36 | fi 37 | 38 | if test "$SPLASH" = "yes" ; then 39 | if test "$1" = "B" ; then 40 | SPLASHSTART=100 41 | SPLASHEND=20000 42 | for i in /etc/init.d/boot.d/S[0-9][0-9]*; do 43 | test -x "$i" || continue 44 | : $((SPLASHNUM++)) 45 | done 46 | unset i 47 | else 48 | SPLASHSTART=0 49 | SPLASHEND=65535 50 | case "$PREVLEVEL-$RUNLEVEL" in 51 | N-[3-5]) SPLASHSTART=20000 ;; 52 | esac 53 | for i in /etc/init.d/rc${RUNLEVEL}.d/S[0-9][0-9]*; do 54 | test -x "$i" || continue 55 | : $((SPLASHNUM++)) 56 | done 57 | for i in /etc/init.d/rc${PREVLEVEL}.d/K[0-9][0-9]*; do 58 | test -x "$i" || continue 59 | : $((SPLASHNUM++)) 60 | done 61 | unset i 62 | fi 63 | splashtrigger () 64 | { 65 | case "$1" in 66 | rlreached*) SPLASHSTART=$SPLASHEND 67 | esac 68 | case "$RUNLEVEL" in 69 | [06]) /sbin/splash -S -p $SPLASHSTART -t "$1" "$SPLASHCFG" ;; 70 | *) /sbin/splash -p $SPLASHSTART -t "$1" "$SPLASHCFG" 71 | esac 72 | } 73 | splashprogress () 74 | { 75 | local SPLASHDIFF 76 | test "$SPLASHNUM" -ge 1 || SPLASHNUM=1 77 | SPLASHDIFF=$(((SPLASHEND - SPLASHSTART)/SPLASHNUM)) 78 | /sbin/splash -p "$SPLASHSTART:$SPLASHDIFF" -t "$1" "$SPLASHCFG" 79 | SPLASHSTART=$((SPLASHSTART+SPLASHDIFF)) 80 | : $((SPLASHNUM--)) 81 | } 82 | splashparallel () 83 | { 84 | local SPLASHDIFF 85 | local SPLASHOLDSTART=$SPLASHSTART 86 | for i; do 87 | test "$SPLASHNUM" -ge 1 || SPLASHNUM=1 88 | SPLASHDIFF=$(((SPLASHEND-SPLASHSTART)/SPLASHNUM)) 89 | SPLASHSTART=$((SPLASHSTART+SPLASHDIFF)) 90 | : $((SPLASHNUM--)) 91 | done 92 | SPLASHDIFF=$((SPLASHSTART-SPLASHOLDSTART)) 93 | echo "-S $SPLASHOLDSTART:$SPLASHDIFF" 94 | } 95 | splashmake () 96 | { 97 | local SPLASHDIFF=$((SPLASHEND-SPLASHSTART)) 98 | echo "-S $SPLASHSTART:$SPLASHDIFF" 99 | SPLASHSTART=$SPLASHEND 100 | SPLASHNUM=0 101 | } 102 | else 103 | splashtrigger () { :; } 104 | splashprogress () { :; } 105 | splashparallel () { echo ""; } 106 | splashmake () { echo ""; } 107 | fi 108 | -------------------------------------------------------------------------------- /files/lib/aaa_base/convert_sysctl: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # read settings from /etc/sysconfig/sysctl and write them to 3 | # /etc/sysctl.conf 4 | 5 | . /etc/sysconfig/sysctl 2>/dev/null || exit 0 6 | 7 | nofile= 8 | if [ "$1" = "--stdout" ]; then 9 | shift 10 | nofile=1 11 | fi 12 | if [ -e "$cfg" -a ! -w "$cfg" ]; then 13 | nofile=1 14 | fi 15 | 16 | cfg=/etc/sysctl.conf 17 | 18 | comment_added='' 19 | _doset() 20 | { 21 | if [ -z "$nofile" -a -z "$comment_added" ]; then 22 | comment_added=1 23 | echo 24 | echo "### converted from /etc/sysconfig/sysctl at `date -R`" 25 | fi 26 | echo "$1 = $2" 27 | } 28 | 29 | doset() 30 | { 31 | if [ -z "$nofile" ]; then 32 | _doset "$@" >> $cfg 33 | else 34 | _doset "$@" 35 | fi 36 | } 37 | 38 | isset() 39 | { 40 | test -z "$nofile" || return 1 41 | test -e /etc/sysctl.conf || return 1 42 | grep -q "$1" /etc/sysctl.conf || return 1 43 | } 44 | 45 | if ! isset net.ipv4.ip_dynaddr; then 46 | if [ -n "$IP_DYNIP" -a "$IP_DYNIP" != 'no' ]; then 47 | if [ "$IP_DYNIP" = 'yes' ]; then 48 | IP_DYNIP=7 49 | fi 50 | if [ -z "${IP_DYNIP//[0-9]/}" ]; then 51 | doset net.ipv4.ip_dynaddr "$IP_DYNIP" 52 | fi 53 | fi 54 | fi 55 | 56 | 57 | if ! isset net.ipv4.tcp_syncookies; then 58 | if [ "$IP_TCP_SYNCOOKIES" = "yes" ]; then 59 | doset net.ipv4.tcp_syncookies 1 60 | fi 61 | fi 62 | 63 | if ! isset net.ipv4.ip_forward; then 64 | if [ "$IP_FORWARD" = "yes" ]; then 65 | doset net.ipv4.ip_forward 1 66 | else 67 | doset net.ipv4.ip_forward 0 68 | fi 69 | fi 70 | 71 | if ! isset net.ipv6.conf.all.forwarding; then 72 | if [ "$IPV6_FORWARD" = 'yes' ]; then 73 | doset net.ipv6.conf.all.forwarding 1 74 | else 75 | doset net.ipv6.conf.all.forwarding 0 76 | fi 77 | fi 78 | 79 | if ! isset net.ipv6.conf.default.use_tempaddr; then 80 | if [ -n "$IPV6_PRIVACY" ]; then 81 | if [ $IPV6_PRIVACY = yes ]; then 82 | IPV6_PRIVACY=2 83 | fi 84 | if [ -z "${IPV6_PRIVACY//[0-9]/}" ]; then 85 | doset net.ipv6.conf.default.use_tempaddr $IPV6_PRIVACY 86 | fi 87 | fi 88 | fi 89 | 90 | if ! isset net.ipv6.conf.all.force_mld_version ; then 91 | if [ -n "$IPV6_MLD_VERSION" -a -z "${IPV6_MLD_VERSION//[0-9]/}" ]; then 92 | doset net.ipv6.conf.all.force_mld_version $IPV6_MLD_VERSION 93 | fi 94 | fi 95 | 96 | if ! isset kernel.sysrq; then 97 | if [ "$ENABLE_SYSRQ" = 'yes' ]; then 98 | ENABLE_SYSRQ=1 99 | elif [ "$ENABLE_SYSRQ" = 'no' -o "$ENABLE_SYSRQ" = '176' ]; then 100 | # 176 is the distro default anyways 101 | ENABLE_SYSRQ='' 102 | fi 103 | if [ -n "$ENABLE_SYSRQ" -a -z "${ENABLE_SYSRQ//[0-9]/}" ]; then 104 | doset kernel.sysrq "$ENABLE_SYSRQ" 105 | fi 106 | fi 107 | 108 | # sparc only 109 | if [ -e /proc/sys/kernel/stop-a ] && ! isset "kernel.stop-a"; then 110 | if [ "$ENABLE_STOP_A" = yes ]; then 111 | doset "kernel.stop-a" 1 112 | else 113 | doset "kernel.stop-a" 0 114 | fi 115 | fi 116 | 117 | if ! isset net.ipv4.tcp_ecn; then 118 | if [ "$DISABLE_ECN" = 'yes' ]; then 119 | doset net.ipv4.tcp_ecn 0 120 | fi 121 | fi 122 | 123 | if ! isset fs.xfs.probe_dmapi; then 124 | if [ "$DMAPI_PROBE" = 'yes' ]; then 125 | doset fs.xfs.probe_dmapi 1 126 | fi 127 | fi 128 | -------------------------------------------------------------------------------- /files/usr/sbin/sysconf_addword: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright 2005 Peter Poeml . All Rights Reserved. 4 | 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | 10 | 11 | debug=false 12 | 13 | usage() { 14 | cat <<-EOF 15 | usage: $(basename $0) [-r] FILE VAR WORD 16 | 17 | Add word WORD to variable VAR in file FILE, or remove 18 | it if the -r option is given. 19 | 20 | Example: 21 | $(basename $0) /etc/sysconfig/apache2 APACHE_SERVER_FLAGS asdf 22 | leads to the change: 23 | -APACHE_SERVER_FLAGS="SSL STATUS ruby" 24 | +APACHE_SERVER_FLAGS="SSL STATUS ruby asdf" 25 | 26 | If multiple lines matching ^VAR= are found (which happens to be a habit of 27 | mine), only the last one is manipulated. 28 | 29 | It does not work for WORD starting with characters like a dash which 30 | prevent word boundary matching. 31 | 32 | EOF 33 | } 34 | 35 | find_last_occurrence () { 36 | # takes two arguments, FILE and VAR 37 | # and return the number of the last line where 38 | # VAR occurs in FILE (not commented) 39 | grep -n -- "^[[:space:]]*$1" $2 | tail -n 1 | cut -d: -f1 40 | } 41 | 42 | word_present () { 43 | . $file 44 | case " ${!var} " in 45 | *" $word "*) true;; 46 | *) false;; 47 | esac 48 | } 49 | 50 | add_word() { 51 | local word=$1 52 | local word_quoted=$2 53 | if ! word_present; then 54 | $debug && cp $file $tmpf 55 | sed -i -e "${lineno} { 56 | s/^[[:space:]]*\($var=\".*\)\(\".*\)/\1 $word_quoted\2/; 57 | s/=\" */=\"/ 58 | }" $file 59 | $debug && diff -u $tmpf $file 60 | else 61 | echo \"$word\" already present 62 | fi 63 | # some balancing for vim"s syntax highlighting 64 | } 65 | 66 | remove_word() { 67 | local word=$1 68 | local word_quoted=$2 69 | if word_present; then 70 | $debug && cp $file $tmpf 71 | sed -i -e "${lineno} { 72 | s/\(['\" ]\)$word_quoted\(['\" ]\)/\1 \2/g 73 | s/ / /g 74 | }" $file 75 | $debug && diff -u $tmpf $file 76 | else 77 | echo \"$word\" not present 78 | fi 79 | # some balancing for vim"s syntax highlighting 80 | 81 | } 82 | 83 | # poor man's option parsing 84 | 85 | case "$1" in 86 | -h) usage; exit 0;; 87 | esac 88 | 89 | if [ $# -lt 3 ]; then 90 | echo not enough arguments 91 | echo 92 | usage; exit 1 93 | fi 94 | 95 | action=add 96 | case "$1" in 97 | -r) action=remove; shift;; 98 | esac 99 | 100 | file=$1; shift 101 | var=$1; shift 102 | word=$1 103 | word_quoted=${1//\//\\\/} 104 | 105 | 106 | if $debug; then 107 | echo FILE: $file 108 | echo VAR: $var 109 | echo WORD: $word 110 | echo current content: 111 | grep "^$var=" $file | tail -n 1 112 | echo 113 | fi 114 | 115 | 116 | if ! [ -r $file ]; then 117 | echo ${0##*/}: file $file is not a readable file 118 | exit 1 119 | fi 120 | 121 | lineno=$(find_last_occurrence $var $file) 122 | if [ -z $lineno ]; then 123 | echo ${0##*/}: variable $var does not occur in $file 124 | exit 1 125 | fi 126 | 127 | $debug && tmpf=$(mktemp /tmp/$(basename $0).XXXXXX) 128 | 129 | if [ $action = add ]; then 130 | add_word $word $word_quoted $lineno 131 | else 132 | remove_word $word $word_quoted $lineno 133 | fi 134 | 135 | $debug && rm -f $tmpf 136 | 137 | exit 0 138 | -------------------------------------------------------------------------------- /files/var/adm/fillup-templates/sysconfig.language: -------------------------------------------------------------------------------- 1 | ## Path: System/Environment/Language 2 | ## Description: 3 | ## Type: string(POSIX,ca_ES.ISO-8859-1,ca_ES.UTF-8,cs_CZ.ISO-8859-2,cs_CZ.UTF-8,da_DE@euro,da_DK.ISO-8859-1,da_DK.UTF-8,de_DE@euro,de_DE.ISO-8859-1,de_DE.UTF-8,el_GR.ISO-8859-7,el_GR.UTF-8,en_GB.ISO-8859-1,en_GB.UTF-8,en_IE@euro,en_IE.ISO-8859-1,en_US.ISO-8859-1,es_ES@euro,es_ES.ISO-8859-1,es_ES.UTF-8,fr_FR@euro,fr_FR.ISO-8859-1,fr_FR.UTF-8,gl_ES@euro,gl_ES.ISO-8859-1,gl_ES.utf-8,hr_HR.ISO-8859-2,hu_HU.ISO-8859-2,hu_HU.UTF-8,it_IT@euro,it_IT.ISO-8859-1,it_IT.UTF-8,ja_JP.eucJP,ja_JP.UTF-8,lt_LT.ISO-8859-13,lt_LT.UTF-8,nl_NL@euro,nl_NL.ISO-8859-1,nl_NL.UTF-8,ru_RU.ISO-8859-5,ru_RU.KOI8-R,ru_RU.UTF-8,sk_SK.ISO-8859-2,sk_SK.UTF-8,tr_TR.ISO-8859-9,tr_TR.UTF-8,ko_KR.eucKR,ko_KR.UTF-8,zh_TW.Big5,zh_TW.UTF-8,zh_CN.GB2312,zh_CN.UTF-8) 4 | ## Default: "" 5 | ## Config: OpenOffice.org,groff,ispell,kde,kdm,profiles,susehelp,susewm,tetex,wdm 6 | # 7 | # 8 | # Local users will get RC_LANG as their default language, i.e. the 9 | # environment variable $LANG . $LANG is the default of all $LC_*-variables, 10 | # as long as $LC_ALL is not set, which overrides all $LC_-variables. 11 | # Root uses this variable only if ROOT_USES_LANG is set to "yes". 12 | # 13 | RC_LANG="" 14 | 15 | ## Type: string 16 | ## Default: "" 17 | # 18 | # This variable will override all LC-variables!! 19 | # Again, ROOT_USES_LANG must be set to "yes", if an effect on the superuser 20 | # account is desired. 21 | # 22 | RC_LC_ALL="" 23 | 24 | ## Type: string 25 | ## Default: "" 26 | # 27 | # This defines the locale in which messages of programs and 28 | # libraries with i18n-support should appear if a translated 29 | # message catalog for the library or the program is installed. 30 | # This also provides localized yes/no answers. 31 | # 32 | RC_LC_MESSAGES="" 33 | 34 | ## Type: string 35 | ## Default: "" 36 | # 37 | # This defines the locale for character handling and classification. 38 | # The libc uses this value in language dependent function calls, such 39 | # as e.g. uppercase/lowercase mapping of foreign characters. 40 | # 41 | RC_LC_CTYPE="" 42 | 43 | ## Type: string 44 | ## Default: "" 45 | # 46 | # This defines the locale for sorting strings and characters. 47 | # It is used by the libc to obtain the alphabetical order of characters 48 | # (e.g. for string comparisons). 49 | # 50 | RC_LC_COLLATE="" 51 | 52 | ## Type: string 53 | ## Default: "" 54 | # 55 | # This defines the locale for date and time output formats. 56 | # i.e.: 06/09/1999 vs. 09.06.1999 57 | # 58 | RC_LC_TIME="" 59 | 60 | ## Type: string 61 | ## Default: "" 62 | # 63 | # This defines the locale for formatting and reading numbers. 64 | # i.e.: 1,234.56 vs. 1.234,56 65 | # 66 | RC_LC_NUMERIC="" 67 | 68 | ## Type: string 69 | ## Default: "" 70 | # 71 | # This defines the locale for formatting and reading money values. 72 | # 73 | RC_LC_MONETARY="" 74 | 75 | ## Type: string 76 | ## Default: "" 77 | # 78 | # This defines the locale for format of paper. 79 | # 80 | RC_LC_PAPER="" 81 | 82 | ## Type: string(ctype) 83 | ## Default: ctype 84 | # 85 | # This defines if the user "root" should use the locale settings 86 | # which are defined here. 87 | # Value "ctype" means that root uses just LC_CTYPE. 88 | # Value "yes" means that root uses the full settings.. 89 | # 90 | ROOT_USES_LANG="ctype" 91 | 92 | ## Type: yesno 93 | ## Default: no 94 | # 95 | # Workaround for missing forward of LANG and LC variables 96 | # of e.g. ssh login connections. 97 | # 98 | AUTO_DETECT_UTF8="no" 99 | 100 | ## Type: string 101 | ## Default: "" 102 | # 103 | # List of installed language supports, use by YaST2 104 | # 105 | INSTALLED_LANGUAGES="" 106 | -------------------------------------------------------------------------------- /files/etc/DIR_COLORS: -------------------------------------------------------------------------------- 1 | # Configuration file for the color ls utility 2 | # 3 | # This file goes in the /etc directory, and must be world readable. 4 | # You can copy this file to .dir_colors in your $HOME directory to override 5 | # the system defaults. 6 | 7 | # COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not 8 | # pipes. 'all' adds color characters to all output. 'none' shuts colorization 9 | # off. 10 | COLOR tty 11 | 12 | # Extra command line options for ls go here. 13 | # Basically these ones are: 14 | # -F = show '/' for dirs, '*' for executables, etc. 15 | # -T 0 = don't trust tab spacing when formatting ls output. 16 | OPTIONS -F -T 0 17 | 18 | # Below, there should be one TERM entry for each termtype that is colorizable 19 | TERM linux 20 | TERM linux-c 21 | TERM console 22 | TERM con132x25 23 | TERM con132x30 24 | TERM con132x43 25 | TERM con132x60 26 | TERM con80x25 27 | TERM con80x28 28 | TERM con80x30 29 | TERM con80x43 30 | TERM con80x50 31 | TERM con80x60 32 | TERM gnome 33 | TERM mach-color 34 | TERM rxvt 35 | TERM rxvt-unicode 36 | TERM screen 37 | TERM screen-w 38 | TERM screen-256color 39 | TERM vt100 40 | TERM vt102 41 | TERM xterm 42 | TERM xterm-debian 43 | TERM xterm-256color 44 | TERM iterm 45 | 46 | # EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output) 47 | EIGHTBIT 1 48 | 49 | # Below are the color init strings for the basic file types. A color init 50 | # string consists of one or more of the following numeric codes: 51 | # 52 | # Attribute codes: 53 | # 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed 54 | # Text color codes: 55 | # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white 56 | # Background color codes: 57 | # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white 58 | 59 | NORMAL 00 # global default, although everything should be something. 60 | FILE 00 # normal file 61 | DIR 01;34 # directory 62 | LINK 00;36 # symbolic link 63 | FIFO 40;33 # pipe 64 | SOCK 01;35 # socket 65 | DOOR 01;35 # door 66 | BLK 40;33;01 # block device driver 67 | CHR 40;33;01 # character device driver 68 | ORPHAN 41;33;01 # symlink to nonexistent file 69 | 70 | # This is for files with execute permission: 71 | EXEC 00;32 72 | 73 | # List any file extensions like '.gz' or '.tar' that you would like ls 74 | # to colorize below. Put the extension, a space, and the color init string. 75 | # (and any comments you want to add after a '#') 76 | 77 | # executables (bright green) 78 | .cmd 00;32 79 | .exe 01;32 80 | .com 01;32 81 | .bat 01;32 82 | .btm 01;32 83 | .dll 01;32 84 | 85 | # archives or compressed 86 | .tar 00;31 87 | .tbz 00;31 88 | .tgz 00;31 89 | .rpm 00;31 90 | .deb 00;31 91 | .arj 00;31 92 | .taz 00;31 93 | .lzh 00;31 94 | .lzma 00;31 95 | .zip 00;31 96 | .zoo 00;31 97 | .z 00;31 98 | .Z 00;31 99 | .gz 00;31 100 | .bz2 00;31 101 | .tb2 00;31 102 | .tz2 00;31 103 | .tbz2 00;31 104 | .xz 00;31 105 | 106 | # image formats 107 | .avi 01;35 108 | .bmp 01;35 109 | .dl 01;35 110 | .fli 01;35 111 | .gif 01;35 112 | .gl 01;35 113 | .jpg 01;35 114 | .jpeg 01;35 115 | .mkv 01;35 116 | .mng 01;35 117 | .mov 01;35 118 | .mp4 01;35 119 | .mpg 01;35 120 | .pcx 01;35 121 | .pbm 01;35 122 | .pgm 01;35 123 | .png 01;35 124 | .ppm 01;35 125 | .svg 01;35 126 | .tga 01;35 127 | .tif 01;35 128 | .webm 01;35 129 | .webp 01;35 130 | .wmv 01;35 131 | .xbm 01;35 132 | .xcf 01;35 133 | .xpm 01;35 134 | 135 | # sound formats 136 | .aiff 00;32 137 | .ape 00;32 138 | .au 00;32 139 | .flac 00;32 140 | .m4a 00;32 141 | .mid 00;32 142 | .mp3 00;32 143 | .mpc 00;32 144 | .ogg 00;32 145 | .voc 00;32 146 | .wav 00;32 147 | .wma 00;32 148 | .wv 00;32 149 | 150 | -------------------------------------------------------------------------------- /files/etc/profile.d/profile.sh: -------------------------------------------------------------------------------- 1 | # 2 | # profile.sh: Set interactive profile environment 3 | # 4 | # Used configuration files: 5 | # 6 | # /etc/sysconfig/windowmanager 7 | # /etc/sysconfig/mail 8 | # /etc/sysconfig/proxy 9 | # /etc/sysconfig/console 10 | # /etc/sysconfig/news 11 | # 12 | 13 | for sys in /etc/sysconfig/windowmanager \ 14 | /etc/sysconfig/mail \ 15 | /etc/sysconfig/proxy \ 16 | /etc/sysconfig/console \ 17 | /etc/sysconfig/news 18 | do 19 | test -s $sys || continue 20 | while read line ; do 21 | case "$line" in 22 | \#*|"") continue ;; 23 | esac 24 | eval val=${line#*=} 25 | case "$line" in 26 | CWD_IN_ROOT_PATH=*) 27 | test "$val" = "yes" || continue 28 | test $UID -lt 100 && PATH=$PATH:. 29 | ;; 30 | CWD_IN_USER_PATH=*) 31 | test "$val" = "yes" || continue 32 | test $UID -ge 100 && PATH=$PATH:. 33 | ;; 34 | FROM_HEADER=*) 35 | FROM_HEADER="${val}" 36 | export FROM_HEADER 37 | ;; 38 | PROXY_ENABLED=*) 39 | PROXY_ENABLED="${val}" 40 | ;; 41 | HTTP_PROXY=*) 42 | test "$PROXY_ENABLED" = "yes" || continue 43 | http_proxy="${val}" 44 | export http_proxy 45 | ;; 46 | HTTPS_PROXY=*) 47 | test "$PROXY_ENABLED" = "yes" || continue 48 | https_proxy="${val}" 49 | export https_proxy 50 | ;; 51 | FTP_PROXY=*) 52 | test "$PROXY_ENABLED" = "yes" || continue 53 | ftp_proxy="${val}" 54 | export ftp_proxy 55 | ;; 56 | GOPHER_PROXY=*) 57 | test "$PROXY_ENABLED" = "yes" || continue 58 | gopher_proxy="${val}" 59 | export gopher_proxy 60 | ;; 61 | SOCKS_PROXY=*) 62 | test "$PROXY_ENABLED" = "yes" || continue 63 | socks_proxy="${val}" 64 | export socks_proxy 65 | SOCKS_PROXY="${val}" 66 | export SOCKS_PROXY 67 | ;; 68 | SOCKS5_SERVER=*) 69 | test "$PROXY_ENABLED" = "yes" || continue 70 | SOCKS5_SERVER="${val}" 71 | export SOCKS5_SERVER 72 | ;; 73 | NO_PROXY=*) 74 | test "$PROXY_ENABLED" = "yes" || continue 75 | no_proxy="${val}" 76 | export no_proxy 77 | NO_PROXY="${val}" 78 | export NO_PROXY 79 | ;; 80 | DEFAULT_WM=*) 81 | DEFAULT_WM="${val}" 82 | ;; 83 | CONSOLE_MAGIC=*) 84 | CONSOLE_MAGIC="${val}" 85 | ;; 86 | ORGANIZATION=*) 87 | test -n "$val" || continue 88 | ORGANIZATION="${val}" 89 | export ORGANIZATION 90 | ;; 91 | NNTPSERVER=*) 92 | NNTPSERVER="${val}" 93 | test -z "$NNTPSERVER" && NNTPSERVER=news 94 | export NNTPSERVER 95 | esac 96 | done < $sys 97 | done 98 | unset sys line val 99 | 100 | if test -d /usr/lib/dvgt_help ; then 101 | DV_IMMED_HELP=/usr/lib/dvgt_help 102 | export DV_IMMED_HELP 103 | fi 104 | 105 | if test -d /usr/lib/rasmol ; then 106 | RASMOLPATH=/usr/lib/rasmol 107 | export RASMOLPATH 108 | fi 109 | 110 | if test "$PROXY_ENABLED" != "yes" ; then 111 | unset http_proxy https_proxy ftp_proxy gopher_proxy no_proxy NO_PROXY socks_proxy SOCKS_PROXY SOCKS5_SERVER 112 | fi 113 | unset PROXY_ENABLED 114 | 115 | if test -z "$WINDOWMANAGER" ; then 116 | SAVEPATH=$PATH 117 | PATH=$PATH:/usr/X11R6/bin:/usr/openwin/bin 118 | desktop=/usr/share/xsessions/${DEFAULT_WM}.desktop 119 | if test -s "$desktop" ; then 120 | while read -r line; do 121 | case ${line} in 122 | Exec=/usr/bin/env*|Exec=env*) 123 | WINDOWMANAGER="${line#Exec=}" 124 | break 125 | ;; 126 | Exec=*) WINDOWMANAGER="$(command -v ${line#Exec=})" 127 | break 128 | esac 129 | done < $desktop 130 | fi 131 | if test -n "$DEFAULT_WM" -a -z "$WINDOWMANAGER" ; then 132 | WINDOWMANAGER="$(command -v ${DEFAULT_WM##*/})" 133 | fi 134 | PATH=$SAVEPATH 135 | unset SAVEPATH desktop 136 | if test -z "$WINDOWMANAGER" ; then 137 | WINDOWMANAGER=xterm 138 | fi 139 | fi 140 | unset DEFAULT_WM 141 | export WINDOWMANAGER 142 | 143 | if test -n "$CONSOLE_MAGIC" ; then 144 | case "$(tty 2> /dev/null)" in 145 | /dev/tty*) 146 | if test "$TERM" = "linux" -a -t ; then 147 | # Use /bin/echo due ksh can not do that 148 | /bin/echo -en "\033$CONSOLE_MAGIC" 149 | fi 150 | esac 151 | fi 152 | # 153 | # end of profile.sh 154 | -------------------------------------------------------------------------------- /files/etc/profile.d/profile.csh: -------------------------------------------------------------------------------- 1 | # 2 | # profile.csh: Set interactive profile environment 3 | # 4 | # Used configuration files: 5 | # 6 | # /etc/sysconfig/windowmanager 7 | # /etc/sysconfig/mail 8 | # /etc/sysconfig/proxy 9 | # /etc/sysconfig/console 10 | # /etc/sysconfig/news 11 | # 12 | 13 | set noglob 14 | set sysconf="" 15 | foreach sys (/etc/sysconfig/windowmanager \ 16 | /etc/sysconfig/mail \ 17 | /etc/sysconfig/proxy \ 18 | /etc/sysconfig/console \ 19 | /etc/sysconfig/news) 20 | if (! -s ${sys:q} ) continue 21 | set sysconf="${sysconf} ${sys}" 22 | end 23 | unset sys 24 | 25 | set val="" 26 | foreach line ( "`/bin/grep -vh '^#' $sysconf`" ) 27 | set val="${line:q:s/=/ /}" 28 | set arr=( $val ) 29 | eval set val="${arr[2-]}" 30 | switch (${line:q}) 31 | case CWD_IN_ROOT_PATH=*: 32 | if ( ${line:q} !~ *=*yes* ) continue 33 | if ( "$path[*]" =~ *.* ) continue 34 | if ( $uid < 100 ) set -l path=( $path . ) 35 | breaksw 36 | case CWD_IN_USER_PATH=*: 37 | if ( ${line:q} !~ *=*yes* ) continue 38 | if ( "$path[*]" =~ *.* ) continue 39 | if ( $uid >= 100 ) set -l path=( $path . ) 40 | breaksw 41 | case FROM_HEADER=*: 42 | setenv FROM_HEADER "${val:q}" 43 | breaksw 44 | case PROXY_ENABLED=*: 45 | set proxy_enabled="${val:q}" 46 | breaksw 47 | case HTTP_PROXY=*: 48 | if (! ${%proxy_enabled} == yes ) continue 49 | setenv http_proxy "${val:q}" 50 | breaksw 51 | case HTTPS_PROXY=*: 52 | if (! ${%proxy_enabled} == yes ) continue 53 | setenv https_proxy "${val:q}" 54 | breaksw 55 | case FTP_PROXY=*: 56 | if (! ${%proxy_enabled} == yes ) continue 57 | setenv ftp_proxy "${val:q}" 58 | breaksw 59 | case GOPHER_PROXY=*: 60 | if (! ${%proxy_enabled} == yes ) continue 61 | setenv gopher_proxy "${val:q}" 62 | breaksw 63 | case SOCKS_PROXY=*: 64 | if (! ${%proxy_enabled} == yes ) continue 65 | setenv socks_proxy "${val:q}" 66 | setenv SOCKS_PROXY "${val:q}" 67 | breaksw 68 | case SOCKS5_SERVER=*: 69 | if (! ${%proxy_enabled} == yes ) continue 70 | setenv SOCKS5_SERVER "${val:q}" 71 | breaksw 72 | case NO_PROXY=*: 73 | if (! ${%proxy_enabled} == yes ) continue 74 | setenv no_proxy "${val:q}" 75 | breaksw 76 | case DEFAULT_WM=*: 77 | set default_wm="${val:q}" 78 | breaksw 79 | case CONSOLE_MAGIC=*: 80 | set console_magic="${val:q}" 81 | breaksw 82 | case ORGANIZATION=*: 83 | if (! ${%val} ) continue 84 | setenv ORGANIZATION "${val:q}" 85 | breaksw 86 | case NNTPSERVER=*: 87 | setenv NNTPSERVER "${val:q}" 88 | if ( ! ${?NNTPSERVER} ) setenv NNTPSERVER news 89 | breaksw 90 | default: 91 | breaksw 92 | endsw 93 | end 94 | unset sysconf line 95 | 96 | if ( -d /usr/lib/dvgt_help ) then 97 | setenv DV_IMMED_HELP /usr/lib/dvgt_help 98 | endif 99 | 100 | if ( -d /usr/lib/rasmol ) then 101 | setenv RASMOLPATH /usr/lib/rasmol 102 | endif 103 | 104 | if ( ${?proxy_enabled} ) then 105 | if ( "$proxy_enabled" != "yes" ) then 106 | unsetenv http_proxy https_proxy ftp_proxy gopher_proxy no_proxy socks_proxy SOCKS_PROXY SOCKS5_SERVER 107 | endif 108 | unset proxy_enabled 109 | endif 110 | 111 | # 112 | # Do not use the `which' builtin nor set path to avoid a rehash 113 | # 114 | if ( ! ${?WINDOWMANAGER} ) then 115 | if (! ${?default_wm} ) set default_wm 116 | set desktop="/usr/share/xsessions/${default_wm}.desktop" 117 | set default_wm="${default_wm:t}" 118 | if ( -s ${desktop:q} ) then 119 | set wm="`sed -rn '/^Exec=/{s@[^=]*=([^=]*)@\1@p;}' ${desktop:q}`" 120 | switch ("${wm:q}") 121 | case /usr/bin/env*: 122 | case env*: 123 | setenv WINDOWMANAGER "${wm:q}" 124 | breaksw 125 | default: 126 | foreach val ($path /usr/X11R6/bin /usr/openwin/bin) 127 | if ( ${val:q} =~ *.* ) continue 128 | set val="${val:q}/${wm:q}" 129 | if ( ! -x ${val:q} ) continue 130 | setenv WINDOWMANAGER "${val:q}" 131 | break 132 | end 133 | breaksw 134 | endsw 135 | unset val wm 136 | endif 137 | unset desktop 138 | if ( ${%default_wm} > 0 && ! ${?WINDOWMANAGER} ) then 139 | foreach val ($path /usr/X11R6/bin /usr/openwin/bin) 140 | if ( ${val:q} =~ *.* ) continue 141 | set val="${val:q}/${default_wm:q}" 142 | if ( ! -x ${val:q} ) continue 143 | setenv WINDOWMANAGER "${val:q}" 144 | break 145 | end 146 | unset val 147 | endif 148 | if ( ! ${?WINDOWMANAGER} ) then 149 | setenv WINDOWMANAGER xterm 150 | endif 151 | endif 152 | unset default_wm 153 | 154 | if ( ${?loginsh} && ${?console_magic} && "$tty" =~ tty* ) then 155 | if ( "$TERM" == "linux" && -o /dev/$tty ) then 156 | echo -n "\033$console_magic" 157 | endif 158 | endif 159 | 160 | unset noglob 161 | # 162 | # end of profile.csh 163 | -------------------------------------------------------------------------------- /files/usr/share/man/man8/resolv+.8: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" man page for resolv+ 3 | .\" manually regenerated from straycat 4 | .\" 5 | .TH RESOLV+ 8 "August 19, 1992" 6 | .SH NAME 7 | resolv+ \- enhanced DNS resolver library 8 | 9 | .SH DESCRIPTION 10 | .IR Resolv+ 11 | is a modified version of the standard Berkeley 12 | BIND host resolver library. Enhancements include support 13 | for host lookups via the Internet Domain Name System 14 | (DNS), the 15 | .IR /etc/hosts 16 | file, and Sun's Network Information 17 | Service (NIS). 18 | 19 | The programmer interface to the resolv+ routines is identical 20 | to that of the standard resolver library. For further information 21 | see the appropriate manual pages. 22 | 23 | .SH CONFIGURATION 24 | As with the standard resolver library, the file 25 | .IR /etc/resolv.conf 26 | must be set up before the resolver can function. 27 | In addition, the file 28 | .IR /etc/host.conf 29 | contains configuration information specific to resolv+. 30 | 31 | The 32 | .IR host.conf 33 | file should contain one configuration keyword per line, 34 | followed by appropriate configuration information. 35 | The keywords recognized are 36 | .IR order , 37 | .IR trim , 38 | .IR multi , 39 | .IR nospoof , 40 | and 41 | .IR reorder . 42 | Each keyword is described seperately below. 43 | .IP order 44 | This keyword specifies how host lookups are to be performed. 45 | It should be followed by one or more lookup methods, seperated 46 | by commas. Valid methods are 47 | .IR bind , 48 | .IR hosts 49 | and 50 | .IR nis . 51 | .IP trim 52 | This keyword may be listed more than once. Each time it should 53 | be followed by a single domain name, with the leading dot. 54 | When set, the resolv+ library will automatically trim the given domain 55 | name from the end of any hostname resolved via DNS. 56 | This is intended for use with local hosts and 57 | domains. (Related note: trim will not affect host- 58 | names gathered via NIS or the hosts file. Care 59 | should be taken to insure that the first hostname 60 | for each entry in the hosts file is fully qualified 61 | or non-qualified, as appropriate for the local 62 | installation.) 63 | .IP multi 64 | Valid values are 65 | .IR on 66 | and 67 | .IR off . 68 | If set to "on," the resolv+ library will return all valid addresses 69 | for a host that appears in the 70 | .IR /etc/hosts 71 | file, instead of only the first. This is off by default, as it 72 | may cause a substantial performance loss at sites 73 | with large hosts files. 74 | .IP nospoof 75 | Valid values are 76 | .IR on 77 | and 78 | .IR off . 79 | If set to "on," the 80 | resolv+ library will attempt to prevent hostname 81 | spoofing to enhance the security of 82 | .IR rlogin 83 | and 84 | .IR rsh . 85 | It works as follows: after performing a host 86 | address lookup, resolv+ will perform a hostname 87 | lookup for that address. If the two hostnames do 88 | not match, the query will fail. 89 | .IP alert 90 | If this option is set to "on" and the 91 | .IR nospoof 92 | option is also set, resolv+ will log a warning of 93 | the error via the 94 | .IR syslog 95 | facility. The default value is off. 96 | .IP reorder 97 | Valid values are 98 | .IR on 99 | and 100 | .IR off . 101 | If set to "on," resolv+ will attempt to reorder host addresses so 102 | that local addresses (i.e., on the same subnet) are 103 | listed first when a gethostbyname() is performed. 104 | Reordering is done for all lookup methods. The 105 | default value is off. 106 | .SH ENVIRONMENT VARIABLES 107 | The following environment variables may be set to override 108 | resolv+'s configured behavior: 109 | .IP RESOLV_HOST_CONF 110 | If set, it will override the default filename 111 | ("/etc/host.conf") for the resolv+ configuration 112 | file. 113 | .IP RESOLV_SERV_ORDER 114 | If set, will override the "order" keyword in the 115 | host.conf file. 116 | .IP RESOLV_SPOOF_CHECK 117 | If set, will override the spoof check flag. Valid 118 | values are "off" to disable checking, "warn" to 119 | enable checking and warning, and "warn off" to 120 | enable checking but not warning. 121 | .IP RESOLV_ADD_TRIM_DOMAINS 122 | If set, contains a list of domains to trim that 123 | will augment, not supersede, the list in the 124 | host.conf file. 125 | .IP RESOLV_OVERRIDE_TRIM_DOMAINS 126 | If set, contains a list of domains to trim that 127 | will override those in the host.conf file. 128 | .IP RESOLV_MULTI 129 | If set, overrides the "multi" keyword in the 130 | host.conf file. 131 | .IP RESOLV_REORDER 132 | If set, overrides the "reorder" keyword in the 133 | host.conf file. 134 | .SH FILES 135 | /etc/host.conf, /etc/hosts 136 | .SH BUGS 137 | Quite possibly. 138 | .SH AUTHOR 139 | The original BIND resolver library comes from the University 140 | of California at Berkeley's Computer Science Research Group. 141 | The original resolv+ modifications were made by 142 | Bill Wisner . 143 | Bug fixes and enhancements were contributed by Patrick Gosling, 144 | Chris Metcalf, John DiMarco and J. Porter Clark, John P. Rouillard, 145 | Dan O'Neill and Tom Limoncelli. 146 | .SH SEE ALSO 147 | .BR resolver(3), 148 | .BR resolver(5), 149 | .BR hosts(5), 150 | .BR hostname(7), 151 | .BR named(8) 152 | 153 | -------------------------------------------------------------------------------- /get_kernel_version.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2000-2002 SuSE Linux AG, Nuremberg. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; either version 2, or (at your option) 6 | any later version. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; if not, write to the Free Software Foundation, 15 | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 16 | 17 | #define _GNU_SOURCE 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | static inline int my_is_alnum_punct(char c) 27 | { 28 | return isdigit(c) || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') 29 | || c == '.' || c == ',' || c == '-' || c == '_' || c == '+'; 30 | } 31 | 32 | int 33 | main (int argc, char *argv[]) 34 | { 35 | FILE *fp; 36 | #define MAX_VERSION_LENGTH 80 37 | char buffer[4096 + MAX_VERSION_LENGTH]; /* buffer + sizeof ("Linux version .....") */ 38 | char command[512] = ""; 39 | int found = 0; 40 | 41 | if (argc != 2) 42 | { 43 | char msg[] = "usage: get_kernel_version \n"; 44 | write (2, msg, sizeof (msg)); 45 | return 1; 46 | } 47 | 48 | /* check if file exist and is compressed */ 49 | { 50 | unsigned char buf [2]; 51 | int fd = open (argv[1], O_RDONLY | O_CLOEXEC); 52 | if (fd == -1) 53 | { 54 | fprintf (stderr, "Cannot open kernel image \"%s\"\n", argv[1]); 55 | return 1; 56 | } 57 | 58 | if (read (fd, buf, 2) != 2) 59 | { 60 | fprintf (stderr, "Short read\n"); 61 | close (fd); 62 | return 1; 63 | } 64 | 65 | if (buf [0] == 037 && (buf [1] == 0213 || buf [1] == 0236)) 66 | { 67 | snprintf (command, sizeof (command), "/bin/gzip -dc %s 2>/dev/null", argv[1]); 68 | fp = popen (command, "re"); 69 | if (fp == NULL) 70 | { 71 | fprintf (stderr, "%s: faild\n", command); 72 | return 1; 73 | } 74 | } 75 | else 76 | { 77 | fp = fopen (argv[1],"re"); 78 | } 79 | close (fd); 80 | } 81 | 82 | memset (buffer, 0, sizeof (buffer)); 83 | 84 | 85 | while (!found) 86 | { 87 | ssize_t in; 88 | int i; 89 | 90 | in = fread (&buffer[MAX_VERSION_LENGTH], 91 | 1, sizeof (buffer) - MAX_VERSION_LENGTH, fp); 92 | 93 | if (in <= 0) 94 | break; 95 | for (i = 0; i < in; i++) 96 | if (buffer[i] == 'L' && buffer[i+1] == 'i' && 97 | buffer[i+2] == 'n' && buffer[i+3] == 'u' && 98 | buffer[i+4] == 'x' && buffer[i+5] == ' ' && 99 | buffer[i+6] == 'v' && buffer[i+7] == 'e' && 100 | buffer[i+8] == 'r' && buffer[i+9] == 's' && 101 | buffer[i+10] == 'i' && buffer[i+11] == 'o' && 102 | buffer[i+12] == 'n' && buffer[i+13] == ' ') 103 | { 104 | int j = i+14; 105 | int number_dots = 0; 106 | 107 | /* check if we really found a version */ 108 | for (j = j+1; buffer[j] != ' '; j++) 109 | { 110 | char c = buffer[j]; 111 | 112 | if (c == '.') { 113 | number_dots++; 114 | continue; 115 | } 116 | 117 | if (((number_dots < 2) && !isdigit(c)) || 118 | ((number_dots >= 2) && !my_is_alnum_punct(c))) 119 | { 120 | fprintf(stderr, "invalid char %c\n", c); 121 | break; 122 | } 123 | } 124 | /* Use the result anyway */ 125 | found = 1; 126 | break; 127 | } 128 | 129 | if (found) 130 | { 131 | int j; 132 | for (j = i+14; buffer[j] != ' '; j++); 133 | buffer[j] = '\0'; 134 | printf ("%s\n", &buffer[i+14]); 135 | } 136 | else 137 | { 138 | if (in < (ssize_t)(sizeof (buffer) - MAX_VERSION_LENGTH)) 139 | break; 140 | memcpy (&buffer[0], &buffer[sizeof (buffer) - MAX_VERSION_LENGTH], 141 | MAX_VERSION_LENGTH); 142 | memset (&buffer[MAX_VERSION_LENGTH], 0, 143 | sizeof (buffer) - MAX_VERSION_LENGTH); 144 | } 145 | } 146 | 147 | if(!found) { 148 | /* ia32 kernel */ 149 | if( 150 | !fseek(fp, 0x202, SEEK_SET) && 151 | fread(buffer, 1, 4, fp) == 4 && 152 | buffer[0] == 0x48 && buffer[1] == 0x64 && 153 | buffer[2] == 0x72 && buffer[3] == 0x53 && 154 | !fseek(fp, 0x20e, SEEK_SET) && 155 | fread(buffer, 1, 2, fp) == 2 156 | ) { 157 | unsigned ofs = 0x200 + ((unsigned char *) buffer)[0] + (((unsigned char *) buffer)[1] << 8); 158 | 159 | if( 160 | !fseek(fp, ofs, SEEK_SET) && 161 | fread(buffer, 1, MAX_VERSION_LENGTH, fp) == MAX_VERSION_LENGTH 162 | ) { 163 | char *s = buffer; 164 | 165 | for(s[MAX_VERSION_LENGTH] = 0; *s; s++) if(*s == ' ') { *s = 0; break; } 166 | if(*buffer) { 167 | found = 1; 168 | printf("%s\n", buffer); 169 | } 170 | } 171 | } 172 | } 173 | 174 | if (command[0] != '\0') 175 | pclose (fp); 176 | else 177 | fclose (fp); 178 | 179 | if (found) 180 | return 0; 181 | else 182 | return 1; 183 | 184 | return 0; 185 | } 186 | 187 | /* vim: set sw=4 ts=8 sts=4 noet: */ 188 | -------------------------------------------------------------------------------- /files/etc/csh.cshrc: -------------------------------------------------------------------------------- 1 | # 2 | # (c) System csh.cshrc for tcsh, Werner Fink '93 3 | # and Jörg Stadler '94 4 | # 5 | # This file sources /etc/profile.d/complete.tcsh and 6 | # /etc/profile.d/bindkey.tcsh used especially by tcsh. 7 | # 8 | # PLEASE DO NOT CHANGE /etc/csh.cshrc. There are chances that your changes 9 | # will be lost during system upgrades. Instead use /etc/csh.cshrc.local for 10 | # your local settings, favourite global aliases, VISUAL and EDITOR 11 | # variables, etc ... 12 | # USERS may write their own $HOME/.csh.expert to skip sourcing of 13 | # /etc/profile.d/complete.tcsh and most parts oft this file. 14 | # 15 | 16 | # 17 | # Just in case the user excutes a command with ssh or sudo 18 | # 19 | if ((${?loginsh} || ${?SSH_CONNECTION} || ${?SUDO_COMMAND}) && ! ${?CSHRCREAD}) then 20 | set _SOURCED_FOR_SSH=true 21 | source /etc/csh.login >& /dev/null 22 | unset _SOURCED_FOR_SSH 23 | endif 24 | # 25 | onintr - 26 | set noglob 27 | # 28 | # Call common progams from /bin or /usr/bin only 29 | # 30 | alias path 'if ( -x /bin/\!^ ) /bin/\!*; if ( -x /usr/bin/\!^ ) /usr/bin/\!*' 31 | if ( -x /bin/id ) then 32 | set id=/bin/id 33 | else if ( -x /usr/bin/id ) then 34 | set id=/usr/bin/id 35 | endif 36 | 37 | # 38 | # Default echo style 39 | # 40 | set echo_style=both 41 | 42 | # 43 | # In case if not known 44 | # 45 | if (! ${?UID} ) set -r UID=${uid} 46 | if (! ${?EUID} ) set -r EUID="`${id} -u`" 47 | 48 | # 49 | # Avoid trouble with Emacs shell mode 50 | # 51 | if ($?EMACS) then 52 | setenv LS_OPTIONS '-N --color=none -T 0'; 53 | endif 54 | 55 | # 56 | # Only for interactive shells 57 | # 58 | if (! ${?prompt}) goto done 59 | 60 | # 61 | # Avoid trouble with Emacs shell mode 62 | # 63 | if ($?EMACS) then 64 | path tset -I -Q 65 | path stty cooked pass8 dec nl -echo 66 | endif 67 | 68 | # 69 | # Let root watch its system 70 | # 71 | if ( "$uid" == "0" ) then 72 | set who=( "%n has %a %l from %M." ) 73 | set watch=( any any ) 74 | endif 75 | 76 | # 77 | # This is an interactive session 78 | # 79 | # Now read in the key bindings of the tcsh 80 | # 81 | if ($?tcsh && -r /etc/profile.d/bindkey.tcsh) source /etc/profile.d/bindkey.tcsh 82 | 83 | # 84 | # Some useful settings 85 | # 86 | set autocorrect=1 87 | set listmaxrows=23 88 | # set cdpath = ( /var/spool ) 89 | # set complete=enhance 90 | # set correct=all 91 | set correct=cmd 92 | set fignore=(.o \~) 93 | # set histdup=erase 94 | set histdup=prev 95 | set history=1000 96 | set listjobs=long 97 | set notify=1 98 | set nostat=( /afs ) 99 | set rmstar=1 100 | set savehist=( $history merge ) 101 | set showdots=1 102 | set symlinks=ignore 103 | # 104 | unset autologout 105 | unset ignoreeof 106 | 107 | if (-r /etc/profile.d/ls.tcsh) source /etc/profile.d/ls.tcsh 108 | 109 | if (-r /etc/profile.d/alias.tcsh) source /etc/profile.d/alias.tcsh 110 | # 111 | # Prompting and Xterm title 112 | # 113 | set prompt="%B%m%b %C2%# " 114 | if ( -o /dev/$tty && -c /dev/$tty ) then 115 | alias cwdcmd '(echo "Directory: $cwd" > /dev/$tty)' 116 | if ( -x /usr/bin/biff ) /usr/bin/biff y 117 | # If we're running under X11 118 | if ( ${?DISPLAY} ) then 119 | if ( ${?TERM} && ${?EMACS} == 0 && ${?MC_SID} == 0 && ${?STY} == 0 && ! -r $HOME/.csh.expert ) then 120 | if ( { tput hs >& /dev/null } || { tput -T $TERM+sl hs >& /dev/null } ) then 121 | if ( ${TERM} == "xterm" ) then 122 | set _tsl=`echo -n '\033]2;'` 123 | set _isl=`echo -n '\033]1;'` 124 | set _fsl=`echo -n '\007'` 125 | else 126 | set _tsl=`tput tsl || tput -T $TERM+sl tsl` >& /dev/null 127 | set _isl='' 128 | set _fsl=`tput fsl || tput -T $TERM+sl fsl` >& /dev/null 129 | fi 130 | endif 131 | set _sc=`tput sc` >& /dev/null 132 | set _rc=`tput rc` >& /dev/null 133 | if ( ${%_tsl} > 0 && ${%_isl} > 0 && ${%_fsl} > 0 ) then 134 | alias cwdcmd '(echo -n "'$_sc$_tsl'$USER on ${HOST}: $cwd'$_fsl$_isl'$HOST'$_fsl$_rc'">/dev/$tty)' 135 | else if (${%_tsl} > 0 && ${%_fsl} > 0 ) then 136 | alias cwdcmd '(echo -n "'$_sc$_tsl'$USER on ${HOST}: $cwd'$_fsl$_rc'">/dev/$tty)' 137 | endif 138 | unset _isl _tsl _fsl _sc _rc 139 | cd . 140 | endif 141 | if ( -x /usr/bin/biff ) /usr/bin/biff n 142 | set prompt="%C2%# " 143 | endif 144 | endif 145 | # 146 | # tcsh help system does search for uncompressed helps file 147 | # within the cat directory system of a old manual page system. 148 | # Therefore we use whatis as alias for this helpcommand 149 | # 150 | alias helpcommand whatis 151 | 152 | # 153 | # Expert mode: if we find $HOME/.csh.expert we skip our settings 154 | # used for interactive completion and read in the expert file. 155 | # 156 | if (-r $HOME/.csh.expert) then 157 | unset noglob 158 | source $HOME/.csh.expert 159 | goto done 160 | endif 161 | 162 | # 163 | # Source the completion extension of the tcsh 164 | # 165 | if ($?tcsh) then 166 | set _rev=${tcsh:r} 167 | set _rel=${_rev:e} 168 | set _rev=${_rev:r} 169 | if (($_rev > 6 || ($_rev == 6 && $_rel > 1)) && -r /etc/profile.d/complete.tcsh) then 170 | source /etc/profile.d/complete.tcsh 171 | endif 172 | # 173 | # Enable editing in multibyte encodings for the locales 174 | # where this make sense, but not for the new tcsh 6.14. 175 | # 176 | if ($_rev < 6 || ($_rev == 6 && $_rel < 14)) then 177 | switch ( `/usr/bin/locale charmap` ) 178 | case UTF-8: 179 | set dspmbyte=utf8 180 | breaksw 181 | case BIG5: 182 | set dspmbyte=big5 183 | breaksw 184 | case EUC-JP: 185 | set dspmbyte=euc 186 | breaksw 187 | case EUC-KR: 188 | set dspmbyte=euc 189 | breaksw 190 | case GB2312: 191 | set dspmbyte=euc 192 | breaksw 193 | case SHIFT_JIS: 194 | set dspmbyte=sjis 195 | breaksw 196 | default: 197 | breaksw 198 | endsw 199 | endif 200 | # 201 | unset _rev _rel 202 | endif 203 | 204 | # 205 | # Set GPG_TTY for curses pinentry 206 | # (see man gpg-agent and bnc#619295) 207 | # 208 | if ( -o /dev/$tty && -c /dev/$tty ) setenv GPG_TTY /dev/$tty 209 | 210 | done: 211 | onintr 212 | unset noglob 213 | 214 | # 215 | # Local configuration 216 | # 217 | if ( -r /etc/csh.cshrc.local ) source /etc/csh.cshrc.local 218 | 219 | # 220 | # End of /etc/csh.cshrc 221 | # 222 | -------------------------------------------------------------------------------- /files/usr/sbin/service: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # /sbin/service Handle boot and runlevel services 4 | # 5 | 6 | sd_booted() 7 | { 8 | test -d /sys/fs/cgroup/systemd/ 9 | } 10 | 11 | # 12 | # Only root should do 13 | # 14 | if ! sd_booted && test "$(id -u)" -ne 0; then 15 | echo "${0##*/}: only root can use ${0##*/}" 1>&2 16 | exit 1 17 | fi 18 | 19 | # 20 | # Location of our service scripts 21 | # 22 | RCDIR="/etc/init.d" 23 | 24 | # legacy actions 25 | actiondir="/usr/lib/initscripts/legacy-actions" 26 | 27 | # 28 | # Clean environment 29 | # 30 | PATH=/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/bin:/usr/bin 31 | test -n "$TERM" || TERM=raw 32 | test -n "$SYSTEMD_NO_WRAP" && export SYSTEMD_NO_WRAP 33 | LANG=POSIX 34 | export PATH TERM LANG 35 | 36 | typeset -i reloaded=0 37 | daemon_reload() 38 | { 39 | local state 40 | ((reloaded)) && return 41 | state=$(systemctl --full --no-legend --no-pager --property=NeedDaemonReload show "$1" 2>/dev/null) 42 | test "$state" = "NeedDaemonReload=no" && return 43 | systemctl daemon-reload 44 | let reloaded++ 45 | } 46 | 47 | is_service() 48 | { 49 | local state=$(systemctl --full --no-legend --no-pager --type=service --property=LoadState show "$1.service" 2>/dev/null) 50 | test "$state" = "LoadState=loaded" 51 | } 52 | 53 | is_target() 54 | { 55 | local state=$(systemctl --full --no-legend --no-pager --type=target --property=LoadState show "$1.target" 2>/dev/null) 56 | test "$state" = "LoadState=loaded" 57 | } 58 | 59 | 60 | is_systemd_action() 61 | { 62 | case "$1" in 63 | start|stop|reload|restart|try-restart|force-reload|status) return 0 ;; 64 | esac 65 | return 1 66 | } 67 | exec_rc () 68 | { 69 | local rc='' 70 | local -i ret 71 | if sd_booted && test -z "$SYSTEMD_NO_WRAP"; then 72 | if is_systemd_action "$2"; then 73 | if is_service "$1"; then 74 | daemon_reload "$1.service" 75 | systemctl "$2" --full "$1.service" 76 | ret=$? 77 | if [ "$2" = status ]; then 78 | systemctl is-active "$1.service" > /dev/null 2>&1 79 | ret=$? 80 | fi 81 | return $ret 82 | elif is_target "$1"; then 83 | daemon_reload "$1.target" 84 | systemctl "$2" "$1.target" 85 | ret=$? 86 | if [ $ret -eq 0 -a "$2" = "status" ]; then 87 | local l=$(systemctl show -p ConsistsOf $1.target 2>/dev/null) 88 | local s 89 | systemctl is-active "$1.target" > /dev/null 2>&1 90 | ret=$? 91 | test $ret -ne 0 && return $ret 92 | for s in ${l#ConsistsOf=} ; do 93 | echo 94 | systemctl status --full "$s" 95 | systemctl is-active "$s" > /dev/null 2>&1 96 | ret=$? 97 | test $ret -ne 0 && return $ret 98 | done 99 | fi 100 | return $ret 101 | fi 102 | echo "$1 is neither service nor target!?" >&2 103 | return "1" 104 | elif [ -x "$actiondir/$1/$2" ]; then 105 | rc="$actiondir/$1/$2" 106 | shift 2 107 | else 108 | echo "Usage: $0 "$1" {start|stop|reload|restart|try-restart|force-reload|status}" 109 | return 1 110 | fi 111 | fi 112 | if [ -z "$rc" ]; then 113 | rc="${RCDIR}/$1" 114 | shift 115 | fi 116 | env -i LANG=$LANG PATH=$PATH TERM=$TERM SYSTEMD_NO_WRAP=$SYSTEMD_NO_WRAP "$rc" ${1+"$@"} 117 | } 118 | 119 | check_rc () 120 | { 121 | local rc="$1" 122 | shift 123 | if test -x ${RCDIR}/$rc; then 124 | return 0 125 | fi 126 | if sd_booted ; then 127 | if is_service "$rc" || is_target "$rc"; then 128 | return 0 129 | fi 130 | fi 131 | return 1 132 | } 133 | 134 | check_wrapper () 135 | { 136 | local n="${0##*/}" 137 | if test "${n#rc}" != "$n"; then 138 | rc="${n#rc}" 139 | return 0 140 | else 141 | rc="$1" 142 | return 1 143 | fi 144 | } 145 | 146 | usage () 147 | { 148 | echo "Usage: ${0##*/} [--help | --status-all | [| --full-restart]]" 1>&2 149 | exit 1 150 | } 151 | 152 | help () 153 | { 154 | echo "Usage: ${0##*/} [ | []]" 155 | echo "Available :" 156 | echo " -h,--help This help." 157 | echo " -s,--status-all List out status of all services." 158 | echo "Usage for specific :" 159 | echo " ${0##*/} service_name argument [option]" 160 | exit 0 161 | } 162 | 163 | status_all=0 164 | full_restart=0 165 | args="" 166 | while test $# -gt 0; do 167 | opt= 168 | if test "${1::1}" = "-"; then 169 | if test ${#1} -gt 2 -a "${1::2}" = "--" ; then 170 | opt="${1:2}" 171 | else 172 | opt="${1:1}" 173 | fi 174 | shift 175 | else 176 | args="${args:+$args }$1" 177 | shift 178 | continue 179 | fi 180 | 181 | case "$opt" in 182 | status-all|s) status_all=1 ;; 183 | full-restart) full_restart=1 ;; 184 | h*) help ;; 185 | *) usage ;; 186 | esac 187 | done 188 | 189 | # 190 | # Determine the status of all services 191 | # 192 | if test $status_all -gt 0 ; then 193 | if test -n "$args" ; then 194 | usage 1>&2 195 | exit 1 196 | fi 197 | if sd_booted; then 198 | systemctl --full --no-legend --no-pager --type=service list-units 199 | else 200 | for rc in ${RCDIR}/*; do 201 | test ! -x "$rc" -o -d "$rc" && continue 202 | rc=${rc##*/} 203 | case "$rc" in 204 | *.local|*.rpm*|*.ba*|*.old|*.new) continue ;; 205 | *.dpkg|*.save|*.swp|*.core) continue ;; 206 | *.disabled) continue ;; 207 | boot|rc|single|halt|reboot) continue ;; 208 | powerfail|rx|Makefile|README) continue ;; 209 | skeleton|*.d) continue ;; 210 | esac 211 | exec_rc $rc status 212 | done 213 | fi 214 | exit 0 215 | fi 216 | 217 | # 218 | # Do a full restart of a few services 219 | # 220 | if test $full_restart -gt 0 ; then 221 | if test -z "$args" ; then 222 | usage 1>&2 223 | exit 1 224 | fi 225 | for rc in $args; do 226 | if check_rc $rc ; then 227 | echo "${0##*/}: no such service $rc" 1>&2 228 | exit 1 229 | fi 230 | done 231 | status=0 232 | for rc in $args; do 233 | exec_rc $rc stop 234 | exec_rc $rc start 235 | test $? -gt 0 && status=1 236 | done 237 | exit $status 238 | fi 239 | 240 | 241 | # 242 | # Execute single service with options 243 | # 244 | if test -z "${args}" ; then 245 | usage 1>&2 246 | exit 1 247 | fi 248 | 249 | set -- $args 250 | if ! check_wrapper "$@"; then 251 | shift 252 | fi 253 | if ! check_rc "$rc" ; then 254 | echo "${0##*/}: no such service $rc" 1>&2 255 | exit 1 256 | fi 257 | 258 | exec_rc $rc ${1+"$@"} 259 | exit $? 260 | -------------------------------------------------------------------------------- /aaa_base.pre: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Run this script in C-Locale, or some tools will fail. 4 | export LC_ALL=C 5 | # /boot should be the first directory. This increases the probability, that 6 | # lilo stuff lies before 1024 cyl. 7 | mkdir -p boot 8 | # 9 | # make sure, tmp directories do exist 10 | # 11 | for i in /tmp /var/tmp ; do 12 | test -d $i || { 13 | if test -L $i ; then 14 | echo "Error! $i is a dangling symlink." 15 | echo 16 | ls -l $i 17 | echo 18 | echo "To avoid big problems this link has to be deleted and a directory" 19 | echo "will be created. Remember to fix it after installation." 20 | echo 21 | rm -f $i 22 | elif test -f $i ; then 23 | echo "$i is a file. This makes no sense. Moving it to $i.save." 24 | mv -v $i $i.save 25 | fi 26 | mkdir -p $i 27 | } 28 | done 29 | # 30 | # now create a var/adm/fillup-templates/passwd.aaa_base. 31 | # If etc/passwd does not exist, copy 32 | # var/adm/fillup-templates/passwd.aaa_base to etc/passwd. 33 | # deleted db2 groups and users were uids 46,47,48 and gids 46,47,48 34 | # 35 | mkdir -p /etc 36 | mkdir -p /var/adm/fillup-templates 37 | echo "root:x:0:0:root:/root:/bin/bash" \ 38 | > /var/adm/fillup-templates/passwd.aaa_base 39 | 40 | echo "root:x:0: 41 | shadow:x:15: 42 | dialout:x:16: 43 | utmp:x:22: 44 | users:x:100:" > /var/adm/fillup-templates/group.aaa_base 45 | 46 | rm -f /var/adm/fillup-templates/shadow.aaa_base 47 | while read LINE ; do 48 | case $LINE in 49 | root*) 50 | echo "root::$(($(date '+%s')/86400))::::::" \ 51 | >> /var/adm/fillup-templates/shadow.aaa_base 52 | ;; 53 | *) 54 | echo "${LINE%%%%:*}:*:$(($(date '+%s')/86400))::::::" \ 55 | >> /var/adm/fillup-templates/shadow.aaa_base 56 | ;; 57 | esac 58 | done < /var/adm/fillup-templates/passwd.aaa_base 59 | 60 | 61 | for file in passwd group ; do 62 | if test -f /etc/$file ; then 63 | # like fillup, but : is the only separator 64 | rm -f /etc/$file.add 65 | sort -k 1,1 -t: -u /etc/$file /var/adm/fillup-templates/$file.aaa_base \ 66 | | sort -k 1,1 -t: /etc/$file - | uniq -u > /etc/$file.add 67 | cat /etc/$file.add >> /etc/$file 68 | rm -f /etc/$file.add 69 | # fix permissions if this script is called with strange umask 70 | chmod 644 /etc/$file 71 | else 72 | cat /var/adm/fillup-templates/$file.aaa_base > /etc/$file 73 | fi 74 | done 75 | 76 | # 77 | # we have several local files, that changed over the time. Check the 78 | # existing one, if they contain real data. If not, delete them. 79 | # 80 | for LOCALFILE in /root/bin/cron.daily.local \ 81 | /etc/init.d/boot.local \ 82 | /etc/init.d/after.local \ 83 | /etc/init.d/before.local \ 84 | /etc/init.d/halt.local \ 85 | /usr/sbin/usradd.local \ 86 | /usr/sbin/usrdel.local \ 87 | /usr/sbin/userdel.local ; do 88 | test -f $LOCALFILE || continue 89 | LOCALFILE_CONTAINS_DATA=false 90 | while read LINE ; do 91 | case "$LINE" in 92 | "#"*) 93 | ;; 94 | "echo "*">"*) 95 | LOCALFILE_CONTAINS_DATA=true 96 | ;; 97 | "echo "*) 98 | ;; 99 | ". /etc/rc.config") 100 | ;; 101 | "exit "*) 102 | ;; 103 | "") 104 | ;; 105 | *) 106 | LOCALFILE_CONTAINS_DATA=true 107 | ;; 108 | esac 109 | done < $LOCALFILE 110 | test "$LOCALFILE_CONTAINS_DATA" = false && rm -f $LOCALFILE 111 | done 112 | mkdir -p /etc/init.d 113 | echo "#! /bin/sh 114 | # 115 | # Copyright (c) 2002 SuSE Linux AG Nuernberg, Germany. All rights reserved. 116 | # 117 | # Author: Werner Fink, 1996 118 | # Burchard Steinbild, 1996 119 | # 120 | # /etc/init.d/boot.local 121 | # 122 | # script with local commands to be executed from init on system startup 123 | # 124 | # Here you should add things, that should happen directly after booting 125 | # before we're going to the first run level. 126 | # 127 | # Please note that the use of this script is deprecated and should be 128 | # avoided for starting commands. You should consider creating a dedicated 129 | # systemd service instead. 130 | # 131 | " > /etc/init.d/boot.local.new 132 | test -e /etc/init.d/boot.local || mv /etc/init.d/boot.local.new /etc/init.d/boot.local 133 | rm -f /etc/init.d/boot.local.new 134 | chmod 744 /etc/init.d/boot.local 135 | echo "#! /bin/sh 136 | # 137 | # Copyright (c) 2002 SuSE Linux AG Nuernberg, Germany. All rights reserved. 138 | # 139 | # Author: Werner Fink, 1998 140 | # Burchard Steinbild, 1998 141 | # 142 | # /etc/init.d/halt.local 143 | # 144 | # script with local commands to be executed from init on system shutdown 145 | # 146 | # Here you should add things, that should happen directly before shuting 147 | # down. 148 | # 149 | # Please note that the use of this script is deprecated and should be 150 | # avoided for starting commands. You should consider creating a dedicated 151 | # systemd service instead. 152 | # 153 | " > /etc/init.d/halt.local.new 154 | test -e /etc/init.d/halt.local || mv /etc/init.d/halt.local.new /etc/init.d/halt.local 155 | rm -f /etc/init.d/halt.local.new 156 | chmod 744 /etc/init.d/halt.local 157 | echo "#! /bin/sh 158 | # 159 | # Copyright (c) 2010 SuSE LINUX Products GmbH, Germany. All rights reserved. 160 | # 161 | # Author: Werner Fink, 2010 162 | # 163 | # /etc/init.d/after.local 164 | # 165 | # script with local commands to be executed from init after all scripts 166 | # of a runlevel have been executed. 167 | # 168 | # Here you should add things, that should happen directly after 169 | # runlevel has been reached. 170 | # 171 | # Please note that the use of this script is deprecated and should be 172 | # avoided for starting commands. You should consider creating a dedicated 173 | # systemd service instead. 174 | # 175 | " > /etc/init.d/after.local.new 176 | test -e /etc/init.d/after.local || mv /etc/init.d/after.local.new /etc/init.d/after.local 177 | rm -f /etc/init.d/after.local.new 178 | chmod 744 /etc/init.d/after.local 179 | 180 | test -e /etc/init.d/before.local && { 181 | grep -q "not supported by systemd" /etc/init.d/before.local || { 182 | echo "# this file is not supported by systemd and the content will probably not be run during bootup" >> /etc/init.d/before.local 183 | } 184 | } 185 | mkdir -p /etc 186 | for LINK in /usr/X11R6/lib/X11 /var/X11R6/lib/fonts /usr/lib/mgetty+sendfax \ 187 | /usr/man/cat? /usr/X11R6/man/cat? /usr/openwin/man/cat? /usr/lib/news ; do 188 | if test -L $LINK ; then 189 | echo "Found forbidden/oldish Link: $LINK ...deleting" 190 | rm -f $LINK 191 | fi 192 | done 193 | 194 | if test -f /root/.gnupg/secring.gpg ; then 195 | cp -a /root/.gnupg/secring.gpg /root/.gnupg/secring.gpg.aaa_save 196 | fi 197 | -------------------------------------------------------------------------------- /files/usr/share/man/man8/chkconfig.8: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" SuSE man page for chkconfig 3 | .\" Copyright (c) 2003-2006 SuSE Linux AG, Nuernberg, Germany. 4 | .\" please send bugfixes or comments to http://www.suse.de/feedback. 5 | .\" 6 | .\" Author: Michael Schroeder 7 | .\" 8 | .TH CHKCONFIG 8 "Oct 2006" 9 | .SH NAME 10 | chkconfig \- enable or disable system services 11 | 12 | .SH SYNOPSIS 13 | .B chkconfig 14 | .B -t|--terse 15 | .RI [ names ] 16 | .br 17 | .B chkconfig 18 | .B -s|--set 19 | .RI [ name 20 | .IR state ] 21 | .br 22 | .B chkconfig 23 | .B -e|--edit 24 | .RI [ names ] 25 | .br 26 | .B chkconfig 27 | .B -c|--check 28 | .I name 29 | .RI [ state ] 30 | .br 31 | .B chkconfig 32 | .B -l|--list 33 | .RB [ --deps ] 34 | .RI [ names ] 35 | .br 36 | .B chkconfig 37 | .B -A|--allservices 38 | .br 39 | .B chkconfig 40 | .B -a|--add 41 | .RI [ names ] 42 | .br 43 | .B chkconfig 44 | .B -d|--del 45 | .RI [ names ] 46 | 47 | .SH DESCRIPTION 48 | chkconfig is used to manipulate the runlevel links at boot time 49 | (see 50 | .IR init.d (7)). 51 | It can be thought of as a frontend to 52 | .IR insserv (8). 53 | Chkconfig can run in six different modes: terse list mode, set mode, 54 | edit mode, list mode, add mode and delete mode. The last three modes 55 | were added for compatiblity reasons. 56 | .SH TERSE LIST MODE 57 | This mode lists the state of the specified services, or all known 58 | services if no service name was provided. Every printed line 59 | consists of the name of the service and the runlevels the 60 | service is configured for at the moment. If it is configured in 61 | no runlevel, 62 | .B off 63 | is used instead, if it is configured in the runlevels defined 64 | as a default by the start script, 65 | .B on 66 | is used. If the service is an enabled inetd or xinetd service, 67 | .B inetd 68 | and 69 | .B xinetd 70 | are used. Inetd/xinetd services are configured in 71 | .I /etc/inetd.d 72 | and 73 | .IR /etc/xinetd.d , 74 | respectively. You can use the 75 | .B -A 76 | or 77 | .B --allservices 78 | parameter to get all services (even the boot.*-services) listed. 79 | .PP 80 | If chkconfig is called without arguments, all services are listed 81 | in terse mode. 82 | .SH SET MODE 83 | Set mode is used to configure at which runlevel a service should 84 | be started. The arguments must be specified as pairs of 85 | service name and new state. You can use 86 | .B on 87 | and 88 | .B off 89 | as special states to select the default set of runlevels or to disable 90 | a service completely. You can use 91 | .B inetd 92 | or 93 | .B xinetd 94 | to configure a service managed by the inetd/xinetd daemons. 95 | .PP 96 | Insserv can calculate dependencies for only one service at the same 97 | time. To work around this limitation imposed by insserv, chkconfig 98 | uses the '-f' option of insserv when it reads the list of services from 99 | standard input. Note that --force switches off all dependency checks 100 | and could lead to depending services no longer working, use with care. 101 | .PP 102 | If no services are specified, chkconfig reads lines from standard 103 | input. Each line must consist of a service/state pair. As this is 104 | exactly the output of the terse list mode, this can be used to 105 | reconfigure a service specification saved by a former run. 106 | 107 | If the option 108 | .B -f 109 | or 110 | .B --force 111 | is also given, insserv is called with a '-f' option. 112 | .SH EDIT MODE 113 | This mode is a combination of the terse list mode and set mode. 114 | It writes the state of all specified services (or all known 115 | services, if no service was provided) into a temporary file, 116 | starts an editor and re-configures all services to reflect the 117 | states of the changed temporary file. 118 | .SH CHECK MODE 119 | This mode can be used to check the state of a service. 120 | chkconfig exits with a return code of '0' if the service is enabled 121 | in all of the specified runlevels, otherwise the exit status 122 | is '1'. If chkconfig is called with only a service name the 123 | current runlevel of the system is used for checking. 124 | .SH LIST MODE 125 | List mode prints for each specified service a line that consists 126 | of the service name and for runlevels zero to six 127 | .B on 128 | or 129 | .B off 130 | depending if the service will be started or not. 131 | .B on 132 | will be printed in bright green if the output is written to a 133 | terminal. If the 134 | .B --deps 135 | option is given, the names of the services that must be started 136 | before this service is appended to each line. The inetd/xinetd 137 | services are listed in extra sections. 138 | 139 | You can use the 140 | .B -A 141 | or 142 | .B --allservices 143 | parameter to get all services (even the boot.*-services) listed. 144 | .SH ADD MODE 145 | Calls insserv 146 | to enable a service and uses list mode to display the new 147 | setting afterwards. 148 | .SH DEL MODE 149 | Same as add mode, but disable the service. 150 | .SH OTHER OPTIONS 151 | When no service names are given on the command line, chkconfig 152 | defaults to all known services excluding those 153 | that are not enabled in runlevels 1 to 6 and start with 154 | .RB ' boot. '. 155 | Use the 156 | .B --allservices 157 | or 158 | .B -A 159 | option if you want to see such services as well. 160 | .SH EXAMPLES 161 | .IP 162 | chkconfig 163 | .PP 164 | list the runlevel configuration of all known services 165 | .IP 166 | chkconfig apache 167 | .PP 168 | list the runlevel configuration of the apache web server 169 | .IP 170 | chkconfig -t apache xntpd 171 | .PP 172 | list the runlevel configuration of the apache web server and 173 | the network time protocol daemon. 174 | .IP 175 | chkconfig apache on 176 | .PP 177 | configure the apache web server to be started on next boot time. 178 | .IP 179 | chkconfig apache 5 180 | .PP 181 | configure the apache web server to be started only if the 182 | system reaches runlevel 5. 183 | .IP 184 | chkconfig apache 35 185 | .PP 186 | configure the apache web server for runlevel 3 and 5. 187 | .IP 188 | chkconfig apache on xntpd off 189 | .PP 190 | configure two services 191 | .IP 192 | chkconfig finger xinetd 193 | .PP 194 | configure a xinetd service 195 | .IP 196 | chkconfig -A >~root/chkconfig.save 197 | .PP 198 | backup the current configuration 199 | .IP 200 | chkconfig -s <~root/chkconfig.save 201 | .PP 202 | restore the configuration 203 | .IP 204 | chkconfig -e apache xntpd 205 | .PP 206 | change the runlevel configuration interactively 207 | .IP 208 | chkconfig -e 209 | .PP 210 | change the runlevel configuration of all services interactively 211 | 212 | .SH FILES 213 | .IP /etc/init.d/ 214 | path to the boot script base directory as required by the Linux 215 | Standard Base Specification (LSB). 216 | .IP /etc/inetd.d/ 217 | path to the inetd services. See the inetd manpage to find out 218 | how to enable this feature. 219 | .IP /etc/xinetd.d/ 220 | path to the xinetd services. 221 | 222 | .SH SEE ALSO 223 | .BR init.d (7), 224 | .BR init (7), 225 | .BR inetd (8) 226 | .BR xinetd (8) 227 | .BR insserv (8) 228 | 229 | .SH COPYRIGHT 230 | 2003 SuSE Linux AG, Nuernberg, Germany. 231 | 232 | .SH AUTHOR 233 | Michael Schroeder 234 | -------------------------------------------------------------------------------- /aaa_base.post: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # 4 | # post.sh - to be done after extraction 5 | # 6 | # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. 7 | # 8 | # 9 | # Run this script in C-Locale, or some tools will fail. 10 | export LC_ALL=C 11 | test -n "$FIRST_ARG" || FIRST_ARG=$1 12 | # 13 | # to make sure, /var/lib/YaST/bin/bootsetup runs fine, delete 14 | # /usr/lib/YaST/.configured2 15 | test -e /usr/lib/YaST/.configured2 && rm -f /usr/lib/YaST/.configured2 16 | # 17 | # there are some installation with an etc/psdevtab, which is only readable 18 | # for root - this slows ps for any other user. starting ps as root, creates 19 | # it, when it doesn't exist (readable). So simply delete it. 20 | # 21 | test -e /etc/psdevtab && rm -f /etc/psdevtab 22 | 23 | if [ "$FIRST_ARG" -gt 1 ]; then 24 | 25 | # boot variables dropped after 13.1 26 | %{remove_and_set -n boot PROMPT_FOR_CONFIRM CONFIRM_PROMPT_TIMEOUT RUN_PARALLEL FLOW_CONTROL FSCK_MAX_INST KLOGCONSOLE_PARAMS ENFORCE_BLOGD} 27 | 28 | # clock variables dropped after 13.1 29 | %{remove_and_set -n clock SYSTOHC FORCE_SYSTOHC BADYEAR HCTOSYS_DEVICE USE_HWCLOCK USE_ADJUST} 30 | 31 | # shutdown variables dropped after 13.1 32 | %{remove_and_set -n shutdown HALT_SOUND HALT_POWERDOWN_INSERT HALT HALT_NETWORK HALT_DISKS} 33 | 34 | # variables droped in 13.1 35 | old_cron_vars="MAX_DAYS_IN_TMP MAX_DAYS_IN_LONG_TMP TMP_DIRS_TO_CLEAR LONG_TMP_DIRS_TO_CLEAR OWNER_TO_KEEP_IN_TMP CLEAR_TMP_DIRS_AT_BOOTUP" 36 | %{remove_and_set -n cron $old_cron_vars} 37 | if [ "$MAX_DAYS_IN_TMP" != '0' -a "$MAX_DAYS_IN_TMP" != 'no' -o \ 38 | "$MAX_DAYS_IN_LONG_TMP" != '0' -a "$MAX_DAYS_IN_LONG_TMP" != 'no' -o \ 39 | "$CLEAR_TMP_DIRS_AT_BOOTUP" != 'no' ]; then 40 | mkdir -p '/var/adm/update-messages' 41 | msgfile='/var/adm/update-messages/%name-%version-%release-tmpdirs' 42 | for i in $old_cron_vars; do 43 | eval v=\$$i 44 | [ -n "$v" -a "$v" != 'no' ] || continue 45 | if [ ! -e "$msgfile" ]; then 46 | cat > "$msgfile" <<-EOF 47 | sysconfig settings for cleaning up temporary directories are no longer 48 | supported. Some of the features are provided by systemd's tmpfile 49 | mechanism instead. Please refer to 'man tmpfiles.d' for more 50 | information. 51 | 52 | Here are the old settings for reference: 53 | 54 | EOF 55 | fi 56 | echo "$i=$v" >> "$msgfile" 57 | done 58 | fi 59 | fi 60 | 61 | if ! [ -d /etc/sysconfig ] ; then 62 | mkdir -p /etc/sysconfig 63 | fi 64 | for i in language backup \ 65 | proxy windowmanager \ 66 | news ; do 67 | %{fillup_only -n $i} 68 | done 69 | if [ -e /etc/sysconfig/sysctl ]; then 70 | echo "merging /etc/sysconfig/sysctl into /etc/sysctl.conf ..." 71 | /lib/aaa_base/convert_sysctl 72 | mv /etc/sysconfig/sysctl /etc/sysconfig/sysctl.rpmsave 73 | fi 74 | test -e /etc/sysctl.conf || cat </etc/sysctl.conf 75 | #### 76 | # 77 | # /etc/sysctl.conf is meant for local sysctl settings 78 | # 79 | # sysctl reads settings from the following locations: 80 | # /boot/sysctl.conf- 81 | # /lib/sysctl.d/*.conf 82 | # /usr/lib/sysctl.d/*.conf 83 | # /usr/local/lib/sysctl.d/*.conf 84 | # /etc/sysctl.d/*.conf 85 | # /run/sysctl.d/*.conf 86 | # /etc/sysctl.conf 87 | # 88 | # To disable or override a distribution provided file just place a 89 | # file with the same name in /etc/sysctl.d/ 90 | # 91 | # See sysctl.conf(5), sysctl.d(5) and sysctl(8) for more information 92 | # 93 | #### 94 | EOF 95 | # fix sysconfig backup dir 96 | if grep -q RCCONFIG_BACKUP_DIR../var/adm/backup/rpmdb /etc/sysconfig/backup; then 97 | sed -i -e "s|^RCCONFIG_BACKUP_DIR=.*|RCCONFIG_BACKUP_DIR=\"/var/adm/backup/sysconfig\"|" \ 98 | /etc/sysconfig/backup 99 | mkdir -p /var/adm/backup/sysconfig 100 | mv /var/adm/backup/rpmdb/sysconfig[-_]* /var/adm/backup/sysconfig 2>/dev/null 101 | fi 102 | 103 | # 104 | # Backup gshadow file and remove it (merge passwords into 105 | # /etc/group before). 106 | # 107 | if [ -f /etc/gshadow -a -x /usr/sbin/grpunconv ]; then 108 | cp -p /etc/gshadow /etc/gshadow-`date "+%Y%m%d"` 109 | chmod 600 /etc/gshadow-`date "+%Y%m%d"` 110 | /usr/sbin/grpunconv 111 | fi 112 | 113 | # 114 | # handle password files 115 | # 116 | for i in passwd group shadow ; do 117 | test -e /var/adm/fillup-templates/$i.aaa_base || continue 118 | echo -n "Updating etc/$i..." 119 | if test -f /etc/$i ; then 120 | cp /etc/$i /etc/$i.tmp 121 | rm -f /etc/$i.add 122 | sort -k 1,1 -t: -u /etc/$i /var/adm/fillup-templates/$i.aaa_base \ 123 | | sort -k 1,1 -t: /etc/$i - | uniq -u > /etc/$i.add 124 | cat /etc/$i.add >> /etc/$i 125 | rm -f /etc/$i.add 126 | if cmp -s /etc/$i /etc/$i.tmp ; then 127 | echo "unchanged" 128 | else 129 | echo "modified" 130 | fi 131 | rm -f /etc/$i.tmp 132 | # If we have a NIS system, we have to make sure, that "^+" is at the end 133 | grep -v "^+" /etc/$i > /etc/$i.tmp || : 134 | grep "^+" /etc/$i >> /etc/$i.tmp || : 135 | test -s /etc/$i.tmp && cat /etc/$i.tmp > /etc/$i 136 | rm -f /etc/$i.tmp 137 | else 138 | cat /var/adm/fillup-templates/$i.aaa_base > /etc/$i 139 | echo "new" 140 | fi 141 | done 142 | # check/fix owner and permission of shadow files 143 | for i in /etc/shadow ; do 144 | chmod 640 $i 145 | chgrp shadow $i 146 | done 147 | # 148 | # Change primary group of nobody to nobody 149 | # and change mistakenly root:users group to root:root (bnc#843230) 150 | # 151 | if [ -x /usr/sbin/usermod ]; then 152 | /usr/sbin/usermod -g nobody nobody 2> /dev/null ||: 153 | 154 | /usr/sbin/usermod -g root root 2> /dev/null ||: 155 | fi 156 | 157 | # 158 | # create mtab if it does not exist 159 | # 160 | if test ! -e /etc/mtab; then 161 | ln -sf /proc/self/mounts /etc/mtab 162 | fi 163 | # 164 | # make sure that several log files exist 165 | # 166 | if test ! -d /var/log ; then 167 | mkdir -p /var/log 168 | fi 169 | 170 | while read file owner mode; do 171 | test -h "$file" && continue 172 | test -e "$file" || touch "$file" 173 | chmod "$mode" "$file" 174 | chown "$owner" "$file" 175 | done < /usr/sbin/userdel.local 189 | #!/bin/bash 190 | # 191 | # Here you can add your own stuff, that should be done for every user who 192 | # will be deleted. 193 | # 194 | # When you delete a user with YaST, this script will be called 195 | # with the login name as parameter. The rest of data can be taken 196 | # from /etc/passwd. 197 | # 198 | EOT 199 | chmod 744 /usr/sbin/userdel.local 200 | fi 201 | 202 | # change all /media mounts (subfs) to noauto 203 | if test -f /etc/fstab ; then 204 | sed -i -e '/^[[:space:]]*#/{p;d}' -e '/[[:space:]]subfs.*noauto/{p;d}' -e '/\/media.*fs=\(cdfss\|floppyfss\)/s/\([[:space:]]subfs[[:space:]][[:space:]]*\)/\1noauto,/' /etc/fstab 205 | fi 206 | 207 | exit 0 208 | -------------------------------------------------------------------------------- /files/etc/java/README: -------------------------------------------------------------------------------- 1 | Dear customer, 2 | 3 | The SUSE Linux distribution contains several versions of development 4 | kits for developing and running java applications and several versions 5 | of runtime environments only for running java applications. 6 | 7 | To be able to run java applications which need different versions of 8 | runtime environment or development kit, you may install several 9 | versions at the same time. One of these development kits or runtime 10 | environments is always the default while the other versions can be used 11 | to develop or run particular applications. 12 | 13 | Note: In the next text JDK stands for java development kit and JRE for 14 | java runtime environment. 15 | 16 | 17 | 18 | The directory /etc/java contains configuration files for all installed 19 | JDKs and JREs. 20 | 21 | These configuration files are used by the setDefaultJava 22 | script which will help you to set default JDK or JRE on your computer. 23 | 24 | They are also used by script setJava which will help you to use one of 25 | valid versions of JDKs or JREs with your application. 26 | 27 | 28 | Syntax of configuration files: 29 | ------------------------------ 30 | 1. empty lines are ignored 31 | 2. white characters are ignored (spaces, TABs) 32 | 3. comments are ignored, they are prefixed by hash '#' 33 | 4. Parameters and values are delimited by ':' or '=' 34 | 35 | Available parameters in config files (see the example config file below): 36 | -------------------------------------------------------------------- 37 | 38 | Priority: 39 | - value is an integer 40 | - the JDK or JRE with higher priority is selected when there are more 41 | JDKs or JREs acceptable for given parameters in the scripts setJava and 42 | setDefaultJava 43 | - a lower value defines higher priority 44 | 45 | Vendor: 46 | - value is a string (spaces are allowed) 47 | - defines java vendor name 48 | 49 | Version: 50 | - value is composed of integers delimited by dots 51 | - defines JDK or JRE version 52 | 53 | Devel: 54 | - value is either "True" or "False" 55 | - value "True" defines that this java is JDK 56 | 57 | JAVA_BINDIR: 58 | - value is a path to a directory 59 | - defines the path to java executables 60 | - will be used for PATH and JAVA_BINDIR environment variables 61 | 62 | JAVA_ROOT: 63 | - value is a path to a directory 64 | - defines the path to the java root directory 65 | - is exactly the same for the JDK and the JRE of the same version 66 | and vendor 67 | - will be used for JAVA_ROOTDIR environment variable 68 | 69 | JAVA_HOME: 70 | - value is path to directory 71 | - some applications use this value to find java executables 72 | in $JAVA_HOME/bin 73 | - the value is usually different for JDK and JRE of the same version 74 | and vendor 75 | - will be used for JAVA_HOME environment variable 76 | 77 | JRE_HOME: 78 | - value is a path to a directory 79 | - some applications use this value to search for java executables and 80 | libraries in $JAVA_JRE/bin and $JAVA_JRE/lib 81 | - the value is the same for the JDK and the JRE of the same version 82 | and vendor 83 | - will be used for JRE_HOME environment variable 84 | 85 | JDK_HOME: 86 | - value is a path to a directory 87 | - it is added as supplement to JRE_HOME 88 | - it is defined for all JDKs 89 | - will be used for JDK_HOME environment variable 90 | 91 | SDK_HOME: 92 | - value is a path to a directory 93 | - it is added as supplement to JRE_HOME 94 | - it is defined for JDKs with version 1.2 and higher 95 | - will be used for SDK_HOME environment variable 96 | 97 | JAVA_LINK: 98 | - value is a absolute or relative path to a directory 99 | - it is used by script setDefaultJava 100 | - the link /usr/lib/java and other compatibility links will point 101 | to this directory name or to this path 102 | 103 | alternative: 104 | - first value defines target; relative or absolute path to a vendor and/or 105 | version specific file 106 | - second value defines link name; absolute path of a symbolic link 107 | which is common for more alternatives 108 | - it defines a common symbolic link for alternative files from different 109 | JREs/SDKs 110 | - the script setDefaultJava is able to update the links for a selected 111 | java 112 | 113 | more_alternatives: 114 | - value is the name of another java configuration file 115 | - it points to a configuration file which contains more alternative links 116 | which should be set together with this java 117 | - it is often used in the config files for SDKs which use some sources 118 | from the related JREs 119 | 120 | 121 | Example: 122 | # this is configutation file for SDK from Sun Microsystems, version 1.4.2 123 | # it is installed in /usr/lib/SunJava2-1.4 124 | 125 | Priority: 30 126 | 127 | Vendor : Sun 128 | Version : 1.4.2 129 | Devel : True 130 | 131 | JAVA_BINDIR = /usr/lib/SunJava2-1.4/bin 132 | JAVA_ROOT = /usr/lib/SunJava2-1.4 133 | JAVA_HOME = /usr/lib/SunJava2-1.4 134 | JRE_HOME = /usr/lib/SunJava2-1.4/jre 135 | JDK_HOME = /usr/lib/SunJava2-1.4 136 | SDK_HOME = /usr/lib/SunJava2-1.4 137 | 138 | JAVA_LINK = SunJava2-1.4 139 | 140 | 141 | # alternatives 142 | # 143 | # man pages 144 | alternative: appletviewer-SunJava2.1.gz /usr/share/man/man1/appletviewer.1.gz 145 | alternative: extcheck-SunJava2.1.gz /usr/share/man/man1/extcheck.1.gz 146 | alternative: idlj-SunJava2.1.gz /usr/share/man/man1/idlj.1.gz 147 | alternative: jar-SunJava2.1.gz /usr/share/man/man1/jar.1.gz 148 | alternative: jarsigner-SunJava2.1.gz /usr/share/man/man1/jarsigner.1.gz 149 | alternative: javac-SunJava2.1.gz /usr/share/man/man1/javac.1.gz 150 | alternative: javadoc-SunJava2.1.gz /usr/share/man/man1/javadoc.1.gz 151 | alternative: javah-SunJava2.1.gz /usr/share/man/man1/javah.1.gz 152 | alternative: javap-SunJava2.1.gz /usr/share/man/man1/javap.1.gz 153 | alternative: jdb-SunJava2.1.gz /usr/share/man/man1/jdb.1.gz 154 | alternative: native2ascii-SunJava2.1.gz /usr/share/man/man1/native2ascii.1.gz 155 | alternative: rmic-SunJava2.1.gz /usr/share/man/man1/rmic.1.gz 156 | alternative: serialver-SunJava2.1.gz /usr/share/man/man1/serialver.1.gz 157 | # 158 | # japanese man pages 159 | alternative: appletviewer-SunJava2.1.gz /usr/share/man/ja/man1/appletviewer.1.gz 160 | alternative: extcheck-SunJava2.1.gz /usr/share/man/ja/man1/extcheck.1.gz 161 | alternative: idlj-SunJava2.1.gz /usr/share/man/ja/man1/idlj.1.gz 162 | alternative: jar-SunJava2.1.gz /usr/share/man/ja/man1/jar.1.gz 163 | alternative: jarsigner-SunJava2.1.gz /usr/share/man/ja/man1/jarsigner.1.gz 164 | alternative: javac-SunJava2.1.gz /usr/share/man/ja/man1/javac.1.gz 165 | alternative: javadoc-SunJava2.1.gz /usr/share/man/ja/man1/javadoc.1.gz 166 | alternative: javah-SunJava2.1.gz /usr/share/man/ja/man1/javah.1.gz 167 | alternative: javap-SunJava2.1.gz /usr/share/man/ja/man1/javap.1.gz 168 | alternative: jdb-SunJava2.1.gz /usr/share/man/ja/man1/jdb.1.gz 169 | alternative: native2ascii-SunJava2.1.gz /usr/share/man/ja/man1/native2ascii.1.gz 170 | alternative: rmic-SunJava2.1.gz /usr/share/man/ja/man1/rmic.1.gz 171 | alternative: serialver-SunJava2.1.gz /usr/share/man/ja/man1/serialver.1.gz 172 | # 173 | more_alternatives: java2-jre 174 | 175 | 176 | Have a lot of fun, 177 | 178 | Your SUSE team 179 | -------------------------------------------------------------------------------- /files/etc/csh.login: -------------------------------------------------------------------------------- 1 | # 2 | # System csh.login for tcsh, 3 | # (c) Werner Fink '93 4 | # 5 | # PLEASE DO NOT CHANGE /etc/csh.login. There are chances that your changes 6 | # will be lost during system upgrades. Instead use /etc/csh.login.local for 7 | # your local environment settings. 8 | # 9 | onintr - 10 | set noglob 11 | # 12 | # Call common progams from /bin or /usr/bin only 13 | # 14 | alias path 'if ( -x /bin/\!^ ) /bin/\!*; if ( -x /usr/bin/\!^ ) /usr/bin/\!*' 15 | if ( -x /bin/id ) then 16 | set id=/bin/id 17 | else if ( -x /usr/bin/id ) then 18 | set id=/usr/bin/id 19 | endif 20 | 21 | # 22 | # Initialize terminal 23 | # 24 | if ( -o /dev/$tty && -c /dev/$tty && ${?prompt} ) then 25 | # Console 26 | if ( ! ${?TERM} ) setenv TERM linux 27 | if ( "$TERM" == "unknown" ) setenv TERM linux 28 | if ( "$TERM" == "ibm327x" ) setenv TERM dumb 29 | if ( "$TERM" =~ screen.* && ! -e /usr/share/terminfo/s/$TERM) setenv TERM screen 30 | if ( ! ${?SSH_TTY} && "$TERM" != "dumb" ) then 31 | path stty sane cr0 pass8 dec 32 | path tset -I -Q 33 | endif 34 | # on iSeries virtual console, detect screen size and terminal 35 | if ( -d /proc/iSeries && ( $tty == "tty1" || "$tty" == "console")) then 36 | setenv LINES 24 37 | setenv COLUMNS 80 38 | eval `path initviocons -q -e -c` 39 | endif 40 | settc km yes 41 | endif 42 | unsetenv TERMCAP 43 | 44 | # 45 | # The user file-creation mask 46 | # 47 | umask 022 48 | 49 | # 50 | # Setup for gzip and (t)csh users 51 | # 52 | if (! ${?CSHRCREAD} ) then 53 | # setenv GZIP -9 54 | setenv CSHEDIT emacs 55 | endif 56 | 57 | # 58 | # In case if not known 59 | # 60 | if (! ${?UID} ) set -r UID=${uid} 61 | if (! ${?EUID} ) set -r EUID="`${id} -u`" 62 | if (! ${?USER} ) set USER="`${id} -un`" 63 | if (! ${?HOME} ) set HOME="" 64 | if (! ${?MAIL} ) setenv MAIL /var/spool/mail/$USER 65 | if ( -x /bin/uname ) then 66 | if (! ${?HOST} ) setenv HOST "`/bin/uname -n`" 67 | if ( ${HOST} == localhost ) setenv HOST "`/bin/uname -n`" 68 | if (! ${?CPU} ) setenv CPU "`/bin/uname -m`" 69 | endif 70 | # Remark: /proc/sys/kernel/domainname and the program domainname 71 | # its self will provide the NIS/YP domainname, see domainname(8). 72 | if ( -s /etc/HOSTNAME ) then 73 | if (! ${?HOSTNAME} ) setenv HOSTNAME `cat /etc/HOSTNAME` 74 | else 75 | if (! ${?HOSTNAME} ) setenv HOSTNAME $HOST 76 | endif 77 | if (! ${?LOGNAME} ) set LOGNAME=$USER 78 | if ( ${CPU} =~ i?86 ) then 79 | setenv HOSTTYPE i386 80 | else 81 | setenv HOSTTYPE "$CPU" 82 | endif 83 | setenv OSTYPE linux 84 | setenv MACHTYPE "${CPU}-suse-${OSTYPE}" 85 | 86 | # 87 | # Get message if mail is reached 88 | # 89 | set mail=$MAIL 90 | 91 | # 92 | # You may use /etc/initscript, /etc/profile.local or the 93 | # ulimit package instead to set up ulimits and your PATH. 94 | # 95 | # if (! -r /etc/initscript ) then 96 | # limit coredumpsize 0 # don't create core files 97 | # eval limit `limit -h datasize` 98 | # eval limit `limit -h stacksize` 99 | # eval limit `limit -h memoryuse` 100 | # endif 101 | 102 | # 103 | # Make path more comfortable 104 | # 105 | unset noglob 106 | set _hpath 107 | set _spath 108 | set _upath=( /usr/local/bin /usr/bin /bin ) 109 | if ( "$HOME" != "/" ) then 110 | foreach _d (${HOME}/bin/${CPU} ${HOME}/bin) 111 | if ( -d $_d ) set _hpath=( $_d $_hpath ) 112 | end 113 | endif 114 | if ( "$uid" == "0" ) then 115 | if ( -d /opt/kde3/sbin ) set _spath=( /opt/kde3/sbin ) 116 | set _spath=( /sbin /usr/sbin /usr/local/sbin $_spath ) 117 | endif 118 | foreach _d (/usr/X11/bin \ 119 | /usr/X11R6/bin \ 120 | /var/lib/dosemu \ 121 | /usr/games \ 122 | /opt/bin \ 123 | /opt/kde3/bin \ 124 | /opt/kde2/bin \ 125 | /opt/kde/bin \ 126 | /usr/openwin/bin \ 127 | /opt/cross/bin ) 128 | if ( -d $_d ) set _upath=( $_upath $_d ) 129 | end 130 | unset _d 131 | 132 | if ( ${?OPENWINHOME} ) then 133 | if ( -d $OPENWINHOME/bin ) then 134 | set _upath=( $_upath $OPENWINHOME/bin ) 135 | endif 136 | endif 137 | 138 | # 139 | # Doing only one rehash 140 | # 141 | set -f path=( $_hpath $_spath $path $_upath ) 142 | unset _upath 143 | unset _spath 144 | unset _hpath 145 | set noglob 146 | 147 | # 148 | # Set some environment variables for TeX/LaTeX (Not used due luatex) 149 | # 150 | #if ( ${?TEXINPUTS} ) then 151 | # setenv TEXINPUTS ":${TEXINPUTS}:${HOME}/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX" 152 | #else 153 | # setenv TEXINPUTS ":${HOME}/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX" 154 | #endif 155 | 156 | # 157 | # Configure the default pager on SUSE Linux 158 | # 159 | if (! ${?LESS} ) then 160 | setenv LESS "-M -I -R" 161 | setenv LESSOPEN "lessopen.sh %s" 162 | setenv LESSCLOSE "lessclose.sh %s %s" 163 | setenv LESS_ADVANCED_PREPROCESSOR "no" 164 | if ( -s /etc/lesskey.bin ) then 165 | setenv LESSKEY /etc/lesskey.bin 166 | endif 167 | setenv PAGER less 168 | setenv MORE -sl 169 | endif 170 | 171 | # 172 | # Minicom 173 | # 174 | if (! ${?CSHRCREAD} ) then 175 | setenv MINICOM "-c on" 176 | endif 177 | 178 | # 179 | # Current manpath 180 | # 181 | if (! ${?CSHRCREAD} && -x /usr/bin/manpath ) then 182 | if ( ${?MANPATH} ) then 183 | setenv MANPATH "${MANPATH}:`(unsetenv MANPATH; /usr/bin/manpath -q)`" 184 | else 185 | setenv MANPATH "`(unsetenv MANPATH; /usr/bin/manpath -q)`" 186 | endif 187 | endif 188 | 189 | # 190 | # Some applications do not handle the XAPPLRESDIR environment properly, 191 | # when it contains more than one directory. More than one directory only 192 | # makes sense if you have a client with /usr mounted via nfs and you want 193 | # to configure applications machine dependent. Uncomment the lines below 194 | # if you want this. 195 | # 196 | #setenv XAPPLRESDIR "$XAPPLRESDIR:/var/X11R6/app-defaults:/usr/X11R6/lib/X11/app-defaults" 197 | 198 | if (! ${?CSHRCREAD} ) then 199 | # 200 | # These settings are recommended for old motif applications 201 | # 202 | if ( -r /usr/share/X11/XKeysymDB ) then 203 | setenv XKEYSYMDB /usr/share/X11/XKeysymDB 204 | else 205 | setenv XKEYSYMDB /usr/X11R6/lib/X11/XKeysymDB 206 | endif 207 | if ( -d /usr/share/X11/nls ) then 208 | setenv XNLSPATH /usr/share/X11/nls 209 | else 210 | setenv XNLSPATH /usr/X11R6/lib/X11/nls 211 | endif 212 | 213 | # 214 | # Midnight Commander needs this to run in color mode 215 | # 216 | setenv COLORTERM 1 217 | endif 218 | 219 | # 220 | # For RCS 221 | # 222 | #setenv VERSION_CONTROL numbered 223 | 224 | # 225 | # Source profile.d scripts and UTF8 settings 226 | # 227 | # But do not source this if CSHRCREAD is already set to avoid 228 | # overriding locale variables already present in the environment 229 | # 230 | if (! ${?CSHRCREAD} ) then 231 | if ( -r /etc/profile.d/csh.ssh ) source /etc/profile.d/csh.ssh 232 | if (! ${?SSH_SENDS_LOCALE} ) then 233 | if ( -r /etc/sysconfig/language && -r /etc/profile.d/csh.utf8 ) then 234 | set _tmp=`/bin/sh -c '. /etc/sysconfig/language; echo $AUTO_DETECT_UTF8'` 235 | if ( ${_tmp} == "yes" ) source /etc/profile.d/csh.utf8 236 | unset _tmp 237 | endif 238 | endif 239 | endif 240 | 241 | # 242 | # Source profile extensions for certain packages, the super 243 | # may disable some of them by setting the sticky bit. 244 | # 245 | if ( -d /etc/profile.d && ! ${?CSHRCREAD} ) then 246 | set _tmp=${?nonomatch} 247 | set nonomatch 248 | unset noglob 249 | foreach _s ( /etc/profile.d/*.csh ) 250 | if ( -r $_s && ! -k $_s ) then 251 | source $_s 252 | endif 253 | end 254 | set noglob 255 | if ( ! ${_tmp} ) unset nonomatch 256 | unset _tmp _s 257 | endif 258 | 259 | # 260 | # Avoid overwriting user settings if called twice 261 | # 262 | if (! ${?CSHRCREAD} ) then 263 | setenv CSHRCREAD true 264 | set -r CSHRCREAD=$CSHRCREAD 265 | endif 266 | 267 | # 268 | # Restore globbing on Ctrl-C 269 | # 270 | onintr 271 | unset noglob 272 | 273 | # 274 | # Local configuration 275 | # 276 | if ( -r /etc/csh.login.local ) source /etc/csh.login.local 277 | 278 | # 279 | # An X session 280 | # 281 | if (${?TERM} && -o /dev/$tty && -c /dev/$tty && ${?prompt} && ! ${?SSH_TTY}) then 282 | if (${TERM} == "xterm") then 283 | echo "Directory: $cwd" 284 | # Last but not least 285 | date 286 | endif 287 | endif 288 | 289 | # 290 | # End of /etc/csh.login 291 | # 292 | -------------------------------------------------------------------------------- /files/usr/share/man/man7/init.d.7: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" SuSE man page for SuSE boot concept 3 | .\" Copyright (c) 1997-2002 SuSE Linux AG, Nuernberg, Germany. 4 | .\" please send bugfixes or comments to http://www.suse.de/feedback. 5 | .\" 6 | .\" Author: Werner Fink 7 | .\" 8 | .TH INIT.D 7 "Nov 15, 2000" "Version 0.4" "The SuSE boot concept" 9 | .\" 10 | .UC 7 11 | .OS SuSE Linux 12 | .\" 13 | .SH NAME 14 | .\" 15 | INIT.D \- The SuSE boot concept 16 | .SH SYNOPSIS 17 | .\" 18 | .B /etc/init.d/* 19 | .PP 20 | .B /etc/sysconfig 21 | .\" 22 | .SH DESCRIPTION 23 | The scripts for controlling the system are placed in 24 | .IR /etc/init.d/ 25 | (they have been moved according to the Linux Standard 26 | Base (LSB) specification). 27 | These scripts are executed directly or indirectly by 28 | .BR /sbin/init , 29 | the father of all processes. The configuration of 30 | .B /sbin/init 31 | is given by the file 32 | .BR /etc/inittab " (see " inittab (5)). 33 | .PP 34 | At boot time, the boot level master script 35 | .I /etc/init.d/boot 36 | is called to initialise the system (e.g. file system check, ...). 37 | It also executes some hardware init scripts linked into 38 | .IR /etc/init.d/boot.d/ . 39 | Then it calls 40 | .IR /etc/init.d/boot.local , 41 | which executes the local commands. 42 | .PP 43 | After system startup, 44 | .B /sbin/init 45 | will normally switch on the default run level given in 46 | .BR /etc/inittab . 47 | It calls the run level master script 48 | .I /etc/init.d/rc 49 | to start or stop services provided by the other scripts under 50 | .IR /etc/init.d/ . 51 | .PP 52 | Both scripts, then boot level master script 53 | .I /etc/init.d/boot 54 | and the the run level master script 55 | .I /etc/init.d/rc 56 | starts all other boot or runlevel scripts either sequential 57 | or partial parallel within their dependencies order. 58 | .PP 59 | To control the services of a run level, the corresponding scripts 60 | are linked into run level directories 61 | .IR /etc/init.d/rc.d/ , 62 | where 63 | .BR =0 , 1 , 2 , 3 , 4 , 5 , 6 , S 64 | is the run level number. 65 | .PP 66 | There are two kinds of 67 | .B symbolic 68 | link: start links, which are called when entering a run level, and 69 | stop links, which are called when leaving a run level. 70 | Note that each service in the run levels 2, 3, 4, and 5 consists of 71 | a start 72 | .B and 73 | a stop link. Within SuSE boot concept a 74 | .I differential 75 | link scheme is used to be able to 76 | .B change 77 | a runlevel in comparision with the former level. 78 | .PP 79 | If parallel executing of the boot scripts is enabled (see 80 | .I /etc/sysconfig/boot 81 | variable 82 | .BR RUN_PARALLEL ) 83 | then both master scripts uses the program 84 | .BR startpar (8) 85 | which starts or stops multiple services in parallel. 86 | .BR Startpar (8) 87 | will look for the files 88 | .IR /etc/init.d/.depend.boot , 89 | .IR /etc/init.d/.depend.start ,\ and 90 | .I /etc/init.d/.depend.stop 91 | to get the dependencies for each service. The files will 92 | be written, beside the symbolic links in the boot and 93 | runlevel directories, by the program 94 | .BR insserv (8). 95 | .PP 96 | To avoid redundant starts when changing run levels, only those 97 | services are started which have no start link in the previous run 98 | level. And to avoid redundant stops when changing run levels, only 99 | those services are stopped which have no start link in the current 100 | level. To control this behaviour, the names of the scripts are added on 101 | the names of the start and stop links. 102 | .PP 103 | To control the order of service starts and stops, the start 104 | and stop links include a number in their link name. 105 | .PP 106 | The system configuration files in 107 | .IR /etc/sysconfig 108 | contain most of the variables used to configure the installed 109 | services. 110 | These variables can easily be changed by 111 | .B YaST 112 | or by using an editor. 113 | .\" 114 | .\" 115 | .\" 116 | .SS Some details 117 | The script 118 | .I /etc/init.d/lpd 119 | starts or stops the line printer daemon for the printing service, 120 | according to the flag used: 121 | .PP 122 | .RS 123 | .B /etc/init.d/lpd start 124 | .RE 125 | and 126 | .PP 127 | .RS 128 | .B /etc/init.d/lpd stop 129 | .RE 130 | .PP 131 | To do this automatically in run level 132 | .BR 3 , 133 | this script is linked into 134 | .I /etc/init.d/rc3.d/ 135 | with these two symbolic links 136 | .PP 137 | .RS 138 | .B /etc/init.d/rc3.d/S20lpd -> ../lpd 139 | .RE 140 | and 141 | .PP 142 | .RS 143 | .B /etc/init.d/rc3.d/K20lpd -> ../lpd 144 | .RE 145 | .PP 146 | The corresponding link with the letter 147 | .B S 148 | is used to start a service. For the printing service the number 149 | between the letter 150 | .B S 151 | and the name should be greater than the number of the start link of 152 | the network service. The corresponding link with the letter 153 | .B K 154 | is used to stop a service. The number of the stop link for the 155 | printing service should be less than that of the stop link for 156 | the network service so that the printer daemon is stopped before 157 | shutting down the network service. 158 | .\" 159 | .\" 160 | .\" 161 | .SS Run levels and their services 162 | .sp 163 | .TP 164 | .B 0 165 | This level is used for halting the system. The only valid service for 166 | this level is the script 167 | .BR halt , 168 | which is linked into 169 | .IR /etc/init.d/rc0.d/ . 170 | The script 171 | .B halt 172 | executes 173 | .IR /etc/init.d/halt.local . 174 | Special system issues for halt or reboot should be added there. 175 | .TP 176 | .B 6 177 | This level is used for rebooting the system. The only valid service for 178 | this level is the script 179 | .BR reboot , 180 | which is linked into 181 | .IR /etc/init.d/rc6.d/ . 182 | The script 183 | .B reboot 184 | executes 185 | .IR /etc/init.d/halt.local . 186 | Specials system issues for halt or reboot should be added there. 187 | .TP 188 | .B S 189 | This mode is used to switch from boot phase into single user mode. 190 | The last valid service for this mode is the script 191 | .BR single , 192 | which is linked into 193 | .IR /etc/init.d/rcS.d/ . 194 | In this mode you have only 195 | .B one 196 | console. 197 | .TP 198 | .B 1 199 | According to the Linux Standard Base (LSB) specification 200 | this runlevel is used to switch from normal runlevel into 201 | single user mode. 202 | .B This is different from former SuSE Linux versions! 203 | .TP 204 | .B 2 205 | The run level 2 is without remote networking. Note that on some 206 | other systems this is identical with the single user mode. 207 | This run level can have more than one virtual console. 208 | .TP 209 | .B 3 210 | The run level 3 is with network. This run level is for 211 | .B server stations 212 | not automatically running 213 | .IR X . 214 | .TP 215 | .B 5 216 | The level 5 is with network and 217 | .BR xdm (1). 218 | You should have a configured and perfectly running 219 | .I X Window System 220 | for this 221 | .B work station 222 | run level. 223 | .TP 224 | .BR 4 225 | The run level 4 is not (yet) used. 226 | .TP 227 | .B /etc/init.d/skeleton 228 | This script is a model for writing your own. You can use 229 | .BR insserv (8) 230 | to include your own script into a run level. 231 | .PP 232 | .SH FILES 233 | .I /etc/init.d/* 234 | .br 235 | .I /etc/init.d/boot 236 | .br 237 | .I /etc/init.d/boot.local 238 | .br 239 | .I /etc/init.d/halt 240 | .br 241 | .I /etc/init.d/halt.local 242 | .br 243 | .I /etc/init.d/rc 244 | .br 245 | .I /etc/init.d/reboot 246 | .br 247 | .I /etc/init.d/skeleton 248 | .br 249 | .I /etc/init.d/single 250 | .br 251 | .I /etc/init.d/boot.d/S[0-9][0-9]* 252 | .br 253 | .I /etc/init.d/rc0.d/{K,S}[0-9][0-9]* 254 | .br 255 | .I /etc/init.d/rc1.d/{K,S}[0-9][0-9]* 256 | .br 257 | .I /etc/init.d/rc2.d/{K,S}[0-9][0-9]* 258 | .br 259 | .I /etc/init.d/rc3.d/{K,S}[0-9][0-9]* 260 | .br 261 | .I /etc/init.d/rc4.d/{K,S}[0-9][0-9]* 262 | .br 263 | .I /etc/init.d/rc5.d/{K,S}[0-9][0-9]* 264 | .br 265 | .I /etc/init.d/rc6.d/{K,S}[0-9][0-9]* 266 | .br 267 | .I /etc/init.d/rcS.d/{K,S}[0-9][0-9]* 268 | .br 269 | .I /etc/init.d/.depend.boot 270 | .br 271 | .I /etc/init.d/.depend.start 272 | .br 273 | .I /etc/init.d/.depend.stop 274 | .br 275 | .I /etc/inittab 276 | .br 277 | .I /etc/sysconfig/boot 278 | .br 279 | .I /etc/sysconfig 280 | .\" 281 | .SH SEE ALSO 282 | .BR insserv (8), 283 | .BR startpar (8), 284 | .BR init (8), 285 | .BR inittab (5), 286 | and the 287 | .I SuSE Linux 288 | handbook, chapter 289 | .IR "The SuSE boot concept" . 290 | .SH COPYRIGHT 291 | 1996-2005 SuSE Linux AG, Nuernberg, Germany. 292 | .SH AUTHORS 293 | Florian La Roche , 294 | Werner Fink , 295 | Burchard Steinbild . 296 | -------------------------------------------------------------------------------- /files/usr/bin/mkinfodir: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # Copyright (c) 1996-2003 SuSE Linux AG, Nuernberg, Germany. 3 | # All rights reserved. 4 | # 5 | # Author: Werner Fink , 1996,1997,2003 6 | # 7 | # MAKEDIR.perl --- Version 0.54 8 | # 9 | 10 | use bytes; 11 | 12 | if ( $#ARGV > 0 ) { 13 | printf(STDERR "%s: Usage:\n", $0); 14 | printf(STDERR " %s [info_dir_file]\n", $0); exit(1); 15 | } 16 | 17 | if ( length($ENV{'INFOPATH'}) > 0 ) { 18 | @PATHS = split(/:/, $ENV{'INFOPATH'}); 19 | } 20 | @PATHS=( 21 | # 22 | # /usr/share/info is the first in Path because it's our main info dir! 23 | # 24 | "/usr/share/info", 25 | "/usr/info", 26 | # 27 | # Insert INFOPATH 28 | # 29 | @PATHS, 30 | "/usr/lib/info", 31 | # 32 | # TeTeX-Infos are looked in by symbolic links in /usr/info. 33 | # 34 | # "/usr/lib/teTeX/info", 35 | "/usr/local/info", 36 | "/usr/local/lib/info", 37 | "/usr/X11R6/info", 38 | "/usr/X11R6/lib/info", 39 | # 40 | # xemacs has big problems handling nodes of the same name but 41 | # different paths ... it's really buggy. 42 | # 43 | "/usr/X11R6/lib/xemacs/info", 44 | "/usr/share/xemacs/xemacs-packages/info", 45 | "/usr/share/xemacs/mule-packages/info", 46 | "/usr/share/xemacs/info", 47 | ); 48 | # 49 | # Special: flushing file descriptor for speed, smothing, and big results 50 | # 51 | sub flush { 52 | local($old) = select(shift); 53 | $| = 1; 54 | print ""; 55 | $| = 0; 56 | select($old); 57 | } 58 | 59 | # 60 | # Open the main dir file 61 | # 62 | $rand = int(rand(32767)); 63 | if ( $#ARGV == 0 ) { 64 | $mdir = "$ARGV[0]"; 65 | $mdirbak = "$ARGV[0].bak"; 66 | $mdirtmp = "$ARGV[0].tmp$$.$rand"; 67 | } else { 68 | $mdir = "$PATHS[0]/dir"; 69 | $mdirbak = "$PATHS[0]/dir.bak"; 70 | $mdirtmp = "$PATHS[0]/dir.tmp$$.$rand"; 71 | } 72 | 73 | sub cleanup { 74 | unlink $mdirtmp; 75 | exit(1); 76 | } 77 | $SIG{'INT'} = "cleanup"; 78 | $SIG{'TERM'} = "cleanup"; 79 | $SIG{'HUP'} = "cleanup"; 80 | $SIG{'PIPE'} = 'IGNORE'; 81 | 82 | if ( !-e $mdir ) { `touch $mdir 2>&1 /dev/null`; } 83 | 84 | if ( -w $mdir ) { 85 | # sysopen(FH, $mdirtmp, O_RDWR|O_CREAT|O_EXCL) or die "Cannot create $mdirtmp\n"; 86 | # close(FH); 87 | if ( -s $mdir && !-e $mdirbak ) { 88 | `cp -p $mdir $mdirbak`; 89 | if ( !-e $mdirbak ) { exit(1); } 90 | } 91 | `cp -p $mdir $mdirtmp`; 92 | if ( !-e $mdirtmp ) { exit(1); } 93 | $filehandle = ">$mdir" ; 94 | } else { 95 | printf(STDERR "%s: Warning, can not write to %s\n", $0, $mdir); 96 | printf(STDERR " ... using STDOUT!\n"); 97 | flush(STDERR); 98 | sleep (2); 99 | $filehandle = ">-"; 100 | } 101 | 102 | ## 103 | ## read info dir 104 | ## 105 | @allinfo = (); 106 | %found = (); 107 | for ( @PATHS ) { 108 | @info = (); 109 | $found{$_}++; 110 | if ( $found{$_} > 1 ) { 111 | next; 112 | } 113 | (-e $_) && (@info = ( -d $_ ) ? ( <$_/*> ) : ( $_ )); 114 | @info = grep(/[^0-9](|\.gz)$/, @info); 115 | @info = grep(!/(dir|dir\.bak|localdir|\~|\,v|\.orig)(|\.gz)$/, @info); 116 | @info = sort grep(!/-\d+\./, @info); 117 | push(@allinfo, @info); 118 | } 119 | 120 | sub basename { 121 | local($name) = @_; 122 | $name =~ s!.*/!!; 123 | $name =~ s/\.gz//; 124 | $name =~ s/\.info//; 125 | $name =~ s/\+/\\\\+/g; 126 | 127 | return ($name); 128 | } 129 | 130 | sub path { 131 | local($name) = @_; 132 | $name =~ s!\/[^/]*$!!; 133 | 134 | return ($name); 135 | } 136 | 137 | ## 138 | ## 139 | ## Global section titles used as keys 140 | ## 141 | ## 142 | @sec = (); 143 | 144 | # 145 | # Reformat if required 146 | # 147 | sub do_format { 148 | local($node, @buf) = @_; 149 | local($base) = basename($node); 150 | local($path) = path($node); 151 | local($name) = ""; 152 | local($desc) = ""; 153 | local($link) = ""; 154 | local($l, $first, @ent); 155 | 156 | $node =~ s/\.gz$//; 157 | $node =~ s/\.info$//; 158 | $node =~ s!//!/!g; 159 | 160 | if ( $path =~ /^$PATHS[0]$/ ) { $node = $base; } 161 | 162 | @ent = (); 163 | foreach $l (@buf) { 164 | $first = index($l,"*"); 165 | 166 | $l =~ s/\($base\)/\($node\)/g; 167 | $l =~ s/::/: \($node\)\./g; 168 | 169 | $name = ""; 170 | $desc = ""; 171 | $link = ""; 172 | 173 | ($name,$desc) = split(/\.\s+/,"$l"); 174 | 175 | $name =~ s/\n//g; 176 | $name =~ s/\s+$//g; 177 | $name =~ s/^\s+//g; 178 | 179 | $desc =~ s/\n//g; 180 | $desc =~ s/\s+$//g; 181 | $desc =~ s/^\s+//g; 182 | 183 | if ( $first == 0 ) { 184 | $l =~ s/^(\s+)//g; 185 | ($name, $link) = split(/:/, $name); 186 | $name =~ s/\s+$//g; 187 | $link =~ s/^\s+//g; 188 | $link =~ s/\.$//g; 189 | $name = $name . ':' . ' ' . $link . '.'; 190 | if ( length($l) > 80 ) { 191 | if ( length($name) < 16 && length($desc) < 62) { 192 | $l = sprintf("%-16.18s%s", $name, $desc); 193 | } else { 194 | if ( length($desc) > 0 ) { 195 | $l = sprintf("%s\n\t\t%s", $name, $desc); 196 | } else { 197 | $l = sprintf("%s", $name); 198 | } 199 | } 200 | } 201 | } 202 | push(@ent, $l); 203 | } 204 | return join("\n", @ent); 205 | } 206 | 207 | # 208 | # No info for entry found, use old or make a new one 209 | # 210 | sub guess_missed { 211 | local($node) = @_; 212 | local($base) = basename($node); 213 | local($path) = path($node); 214 | local($cur) = "default"; 215 | local($ldir); 216 | local(@buf, $add, $lines); 217 | 218 | $node =~ s/\.gz$//; 219 | $node =~ s/\.info$//; 220 | $node =~ s!//!/!g; 221 | 222 | if ( $path =~ /^$PATHS[0]$/ ) { $node = $base; } 223 | 224 | if ( $path !~ /^$PATHS[0]$/ ) { 225 | $ldir = "$path/dir"; 226 | } else { 227 | $ldir = $mdirtmp; 228 | } 229 | 230 | @buf = (); 231 | if ( -e $ldir && -r $ldir ) { 232 | open(FILE, $ldir); 233 | $add = 0; 234 | while () { 235 | # 236 | # read next few lines if there is information ($add == 1) 237 | # 238 | if ( $add == 1 ) { 239 | if ( /^\s+[^\:\*]+$/ ) { 240 | push(@buf, $_); $lines++; 241 | next; 242 | } 243 | last; 244 | } 245 | if ( /^\*\s+$base\:\s+\($base\)\.\s+\w/i ) { 246 | $add = 1; push(@buf, $_); $lines = 1; 247 | } elsif ( /^\*\s+$base\:\:\s+\w/i ) { 248 | $add = 1; push(@buf, $_); $lines = 1; 249 | } elsif ( /^\*\s+$base\:\s+\($base\)\.\s+$/i ) { 250 | $add = 1; push(@buf, $_); $lines = 0; 251 | } elsif ( /^\*\s+$base\:\:\s+$/i ) { 252 | $add = 1; push(@buf, $_); $lines = 0; 253 | } else { 254 | next; 255 | } 256 | } 257 | close(FILE); 258 | } 259 | 260 | if ($lines > 0) { 261 | $sec{$cur} = join("\n", $sec{$cur}, do_format($node, @buf)); 262 | } else { 263 | $base =~ s!(.*)!\L$1!; 264 | $base =~ s!(.*)!\u$1!; 265 | $base = '* ' . $base . ':'; 266 | $sec{$cur} = join("\n", $sec{$cur}, 267 | sprintf("%-0.80s %s\n", $base, '(' . $node . ').')); 268 | } 269 | } 270 | 271 | # 272 | # read info file for entry in dir file 273 | # 274 | sub read_entry { 275 | local($file) = @_; 276 | local($add, $lines, @buf); 277 | local($cur) = "default"; 278 | local($source) = $file =~ /\.gz$/ ? "gunzip -q -d -c $file 2>/dev/null |" : "< $file"; 279 | local(@buf); 280 | 281 | $add = 0; 282 | $lines = 0; 283 | @buf = (); 284 | open(_FILE, $source) or warn "can't open $source\n"; 285 | while (<_FILE>) { 286 | chomp; 287 | s/\s+$//; 288 | last if ( /^($|File:)/ ); 289 | next if ( /^$/ ); 290 | if ( /^INFO-DIR-SECTION/o ) { 291 | s/^INFO-DIR-SECTION\s+//; 292 | $cur = $_; 293 | next; 294 | } 295 | if ( /^START-INFO-DIR-ENTRY/o ) { 296 | $add = 1; 297 | push(@buf, "\n") if ( $cur =~ /default/ ); 298 | next; 299 | } 300 | if ( /^END-INFO-DIR-ENTRY/o ) { 301 | $add = 0; 302 | $sec{$cur} = join("\n", $sec{$cur}, do_format($file, @buf)); 303 | next; 304 | } 305 | if ( $add == 1 ) { 306 | $lines++; 307 | push(@buf, $_); 308 | next; 309 | } 310 | } 311 | close(_FILE); 312 | 313 | guess_missed($file) if ( $lines == 0 ); 314 | } 315 | 316 | # 317 | # Do all the stuff 318 | # 319 | foreach $elem (@allinfo) { 320 | read_entry($elem) if ( -f $elem ); 321 | } 322 | 323 | open(DIR, "$filehandle") or die "Cannot open $filehandle\n"; 324 | binmode DIR; 325 | 326 | ## 327 | ## define top format 328 | ## 329 | format DIR = 330 | -*- Text -*- 331 | This is the file /usr/info/dir, which contains the topmost node of the 332 | Info hierarchy. The first time you invoke Info you start off 333 | looking at that node, which is (dir)Top. 334 |  335 | File: dir Node: Top This is the top of the INFO tree 336 | 337 | This (the Directory node) gives a menu of major topics. 338 | 339 | Usage in info-mode of EMACS: 340 | Typing "d" returns here, typing "?" lists all INFO commands, 341 | typing "q" exits, typing "h" gives a primer for first-timers, 342 | pressing 2nd button on a highlighted word follows cross-reference. 343 | 344 | ---- EDIT WITH CARE: ---- 345 | ---- Only descriptive text for otherwise empty topics will survive ---- 346 | 347 | * Menu: The list of major topics begins on the next line. 348 | 349 | . 350 | ## 351 | ## end top format 352 | ## 353 | write DIR; # write top format 354 | flush(DIR); 355 | 356 | @sec = sort keys %sec; 357 | @keys = keys %sec; 358 | 359 | while ($#keys >= 0) { 360 | $cur = pop(@keys); 361 | if ( $cur =~ /default/ ) { 362 | printf(DIR "\nVarious Utilities"); 363 | } else { 364 | printf(DIR "\n%s", $cur); 365 | } 366 | printf(DIR "%s\n", $sec{$cur}); 367 | } 368 | 369 | printf(DIR "\n* Locales:\n"); 370 | close(DIR); 371 | 372 | unlink($mdirtmp) if ( -e $mdirtmp ); 373 | exit 0; 374 | -------------------------------------------------------------------------------- /files/etc/profile: -------------------------------------------------------------------------------- 1 | # /etc/profile for SUSE Linux 2 | # 3 | # PLEASE DO NOT CHANGE /etc/profile. There are chances that your changes 4 | # will be lost during system upgrades. Instead use /etc/profile.local for 5 | # your local settings, favourite global aliases, VISUAL and EDITOR 6 | # variables, etc ... 7 | 8 | # 9 | # Check which shell is reading this file 10 | # 11 | norc=false 12 | restricted=false 13 | if test -f /proc/mounts ; then 14 | if ! is=$(readlink /proc/$$/exe 2>/dev/null) ; then 15 | case "$0" in 16 | *pcksh) is=ksh ;; 17 | *) is=sh ;; 18 | esac 19 | fi 20 | case "$is" in 21 | */bash) is=bash 22 | while read -r -d $'\0' a ; do 23 | case "$a" in 24 | --norc) 25 | readonly norc=true ;; 26 | --restricted) 27 | readonly restricted=true ;; 28 | esac 29 | done < /proc/$$/cmdline 30 | case "$0" in 31 | sh|-sh|*/sh) 32 | is=sh ;; 33 | esac ;; 34 | */ash) is=ash ;; 35 | */dash) is=ash ;; 36 | */ksh) is=ksh ;; 37 | */ksh93) is=ksh ;; 38 | */pdksh) is=ksh ;; 39 | */mksh) is=ksh ;; 40 | */lksh) is=ksh ;; 41 | */*pcksh) is=ksh ;; 42 | */zsh) is=zsh ;; 43 | */*) is=sh ;; 44 | esac 45 | # 46 | # `r' in $- occurs *after* system files are parsed 47 | # 48 | for a in $SHELL ; do 49 | case "$a" in 50 | */r*sh) 51 | readonly restricted=true ;; 52 | -r*|-[!-]r*|-[!-][!-]r*) 53 | readonly restricted=true ;; 54 | --restricted) 55 | readonly restricted=true ;; 56 | esac 57 | done 58 | unset a 59 | else 60 | is=sh 61 | fi 62 | 63 | # 64 | # Call common progams from /bin or /usr/bin only 65 | # 66 | path () 67 | { 68 | command -p ${1+"$@"} 69 | } 70 | 71 | # 72 | # Initialize terminal 73 | # 74 | tty=`path tty 2> /dev/null` 75 | test $? -ne 0 && tty="" 76 | if test -O "$tty" -a -n "$PS1"; then 77 | test -z "${TERM}" && { TERM=linux; export TERM; } 78 | test "${TERM}" = "unknown" && { TERM=linux; export TERM; } 79 | test "${TERM}" = "ibm327x" && { TERM=dumb; export TERM; } 80 | case "$TERM" in 81 | screen.*) 82 | test -e /usr/share/terminfo/s/${TERM} || { TERM=screen; export TERM; } 83 | esac 84 | # Do not change settings on local line if connected to remote 85 | if test -z "$SSH_TTY" -a "${TERM}" != "dumb" ; then 86 | path stty sane cr0 pass8 dec 87 | path tset -I -Q 88 | fi 89 | # on iSeries virtual console, detect screen size and terminal 90 | if test -d /proc/iSeries -a \( "$tty" = "/dev/tty1" -o "$tty" = "/dev/console" \) ; then 91 | LINES=24 92 | COLUMNS=80 93 | export LINES COLUMNS TERM 94 | eval `path initviocons -q -e` 95 | fi 96 | fi 97 | unset TERMCAP 98 | 99 | # 100 | # Time until a complete key sequence must have arrived 101 | # 102 | #ESCDELAY=2000 103 | #export ESCDELAY 104 | 105 | # 106 | # The user file-creation mask 107 | # 108 | # The global umask value is stored in /etc/login.defs and 109 | # will be set by pam_umask.so (see "man pam_umask"). 110 | #umask 022 111 | 112 | # 113 | # Setup for gzip and (t)csh users 114 | # 115 | if test -z "$PROFILEREAD" ; then 116 | # GZIP=-9 117 | # export GZIP 118 | CSHEDIT=emacs 119 | export CSHEDIT 120 | fi 121 | 122 | # 123 | # ksh/ash sometimes do not know 124 | # 125 | test -z "$UID" && readonly UID=`path id -ur 2> /dev/null` 126 | test -z "$EUID" && readonly EUID=`path id -u 2> /dev/null` 127 | test -z "$USER" && USER=`path id -un 2> /dev/null` 128 | test -z "$MAIL" && MAIL=/var/spool/mail/$USER 129 | if test -x /bin/uname ; then 130 | test -z "$HOST" && HOST=`/bin/uname -n` 131 | test "$HOST" = "localhost" && HOST=`/bin/uname -n` 132 | test -z "$CPU" && CPU=`/bin/uname -m` 133 | fi 134 | # Remark: /proc/sys/kernel/domainname and the program domainname 135 | # its self will provide the NIS/YP domainname, see domainname(8). 136 | if test -s /etc/HOSTNAME ; then 137 | test -z "$HOSTNAME" && HOSTNAME=`cat /etc/HOSTNAME` 138 | else 139 | test -z "$HOSTNAME" && HOSTNAME=$HOST 140 | fi 141 | test -z "$LOGNAME" && LOGNAME=$USER 142 | case "$CPU" in 143 | i?86) HOSTTYPE=i386 ;; 144 | *) HOSTTYPE=${CPU} ;; 145 | esac 146 | OSTYPE=linux 147 | MACHTYPE=${CPU}-suse-${OSTYPE} 148 | # Do NOT export UID, EUID, USER, and LOGNAME 149 | export MAIL HOST CPU HOSTNAME HOSTTYPE OSTYPE MACHTYPE 150 | 151 | # 152 | # You may use /etc/initscript, /etc/profile.local or the 153 | # ulimit package instead to set up ulimits and your PATH. 154 | # 155 | # if test "$is" != "ash" -a ! -r /etc/initscript; then 156 | # ulimit -Sc 0 # don't create core files 157 | # ulimit -Sd $(ulimit -Hd) 158 | # ulimit -Ss $(ulimit -Hs) 159 | # ulimit -Sm $(ulimit -Hm) 160 | # fi 161 | 162 | # 163 | # Make path more comfortable 164 | # 165 | if test -z "$PROFILEREAD" ; then 166 | PATH=/usr/local/bin:/usr/bin:/bin 167 | if test "$HOME" != "/" ; then 168 | for dir in $HOME/bin/$CPU $HOME/bin ; do 169 | test -d $dir && PATH=$dir:$PATH 170 | done 171 | fi 172 | if test "$UID" = 0 ; then 173 | test -d /opt/kde3/sbin && PATH=/opt/kde3/sbin:$PATH 174 | PATH=/sbin:/usr/sbin:/usr/local/sbin:$PATH 175 | fi 176 | for dir in /usr/X11/bin \ 177 | /usr/X11R6/bin \ 178 | /var/lib/dosemu \ 179 | /usr/games \ 180 | /opt/bin \ 181 | /opt/kde3/bin \ 182 | /opt/kde2/bin \ 183 | /opt/kde/bin \ 184 | /usr/openwin/bin \ 185 | /opt/cross/bin 186 | do 187 | test -d $dir && PATH=$PATH:$dir 188 | done 189 | unset dir 190 | export PATH 191 | fi 192 | 193 | # 194 | # Most bourn shell clones knows about this 195 | # 196 | if test -z "$PROFILEREAD" ; then 197 | HISTSIZE=1000 198 | export HISTSIZE 199 | fi 200 | 201 | # 202 | # Set some environment variables for TeX/LaTeX (Not used due luatex) 203 | # 204 | #if test -n "$TEXINPUTS" ; then 205 | # TEXINPUTS=":$TEXINPUTS:$HOME/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX" 206 | #else 207 | # TEXINPUTS=":$HOME/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX" 208 | #fi 209 | #export TEXINPUTS 210 | 211 | # 212 | # Configure the default pager on SUSE Linux 213 | # 214 | if test -z "$LESS" -a -x /usr/bin/less ; then 215 | LESS="-M -I -R" 216 | LESSOPEN="lessopen.sh %s" 217 | LESSCLOSE="lessclose.sh %s %s" 218 | LESS_ADVANCED_PREPROCESSOR="no" 219 | if test -s /etc/lesskey.bin ; then 220 | LESSKEY=/etc/lesskey.bin 221 | fi 222 | PAGER=less 223 | MORE=-sl 224 | export LESSOPEN LESSCLOSE LESS LESSKEY PAGER LESS_ADVANCED_PREPROCESSOR MORE 225 | fi 226 | 227 | # 228 | # Minicom 229 | # 230 | if test -z "$PROFILEREAD" ; then 231 | MINICOM="-c on" 232 | export MINICOM 233 | fi 234 | 235 | # 236 | # Current manpath 237 | # 238 | if test -z "$PROFILEREAD" ; then 239 | tmp="$MANPATH" 240 | unset MANPATH 241 | if test -n "$tmp" ; then 242 | MANPATH="${tmp}:`test -x /usr/bin/manpath && /usr/bin/manpath -q`" 243 | else 244 | MANPATH="`test -x /usr/bin/manpath && /usr/bin/manpath -q`" 245 | fi 246 | unset tmp 247 | export MANPATH 248 | fi 249 | 250 | # 251 | # Some applications do not handle the XAPPLRESDIR environment properly, 252 | # when it contains more than one directory. More than one directory only 253 | # makes sense if you have a client with /usr mounted via nfs and you want 254 | # to configure applications machine dependent. Uncomment the lines below 255 | # if you want this. 256 | # 257 | #XAPPLRESDIR="$XAPPLRESDIR:/var/X11R6/app-defaults:/usr/X11R6/lib/X11/app-defaults" 258 | #export XAPPLRESDIR 259 | 260 | # 261 | # These settings are recommended for old motif applications 262 | # 263 | if test -z "$PROFILEREAD" ; then 264 | if [ -r /usr/share/X11/XKeysymDB ]; then 265 | export XKEYSYMDB=/usr/share/X11/XKeysymDB 266 | else 267 | export XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB 268 | fi 269 | if [ -d /usr/share/X11/nls ]; then 270 | export XNLSPATH=/usr/share/X11/nls 271 | else 272 | export XNLSPATH=/usr/X11R6/lib/X11/nls 273 | fi 274 | 275 | # 276 | # Midnight Commander needs this to run in color mode 277 | # 278 | COLORTERM=1 279 | export COLORTERM 280 | fi 281 | 282 | # 283 | # For RCS 284 | # 285 | #VERSION_CONTROL=numbered 286 | #export VERSION_CONTROL 287 | 288 | # 289 | # Source profile.d files and UTF8 settings 290 | # 291 | # But do not source this if PROFILEREAD is already set to avoid 292 | # overriding locale variables already present in the environment 293 | # 294 | if test -z "$PROFILEREAD" ; then 295 | test -r /etc/profile.d/sh.ssh && . /etc/profile.d/sh.ssh 296 | if test -z "$SSH_SENDS_LOCALE" ; then 297 | if test -r /etc/sysconfig/language -a -r /etc/profile.d/sh.utf8 ; then 298 | tmp="$(. /etc/sysconfig/language; echo $AUTO_DETECT_UTF8)" 299 | test "$tmp" = "yes" && . /etc/profile.d/sh.utf8 300 | unset tmp 301 | fi 302 | fi 303 | fi 304 | 305 | # 306 | # Source profile extensions for certain packages, the super 307 | # may disable some of them by setting the sticky bit. 308 | # 309 | if test -d /etc/profile.d -a -z "$PROFILEREAD" ; then 310 | for s in /etc/profile.d/*.sh ; do 311 | test -r $s -a ! -k $s && . $s 312 | done 313 | unset s 314 | fi 315 | 316 | if test "$is" != "ash" ; then 317 | # 318 | # And now let's see if there is a local profile 319 | # (for options defined by your sysadmin, not SUSE Linux) 320 | # 321 | test -s /etc/profile.local && . /etc/profile.local 322 | fi 323 | 324 | # 325 | # Avoid overwriting user settings if called twice 326 | # 327 | if test -z "$PROFILEREAD" ; then 328 | readonly PROFILEREAD=true 329 | export PROFILEREAD 330 | fi 331 | 332 | # 333 | # Standard ssh command does not do an login, therefore 334 | # /etc/profile will be sourced by /etc/bash.bashrc 335 | # 336 | if test -z "$_SOURCED_FOR_SSH" -a "$norc" != true ; then 337 | # 338 | # System BASH specials, maybe also good for other shells 339 | # Note that ksh always reads /etc/ksh.kshrc 340 | # 341 | if test "$is" != ksh -a "$is" != zsh ; then 342 | test -r /etc/bash.bashrc && . /etc/bash.bashrc 343 | fi 344 | if test "$restricted" = true ; then 345 | readonly _HOMEBASHRC=true 346 | fi 347 | if test "$is" = "bash" -a -z "$_HOMEBASHRC" ; then 348 | # loop detection 349 | readonly _HOMEBASHRC=true 350 | test -r $HOME/.bashrc && . $HOME/.bashrc 351 | fi 352 | 353 | # 354 | # KSH specials 355 | # 356 | if test "$is" = "ksh" -a -r /etc/ksh.kshrc ; then 357 | if test "$restricted" = true ; then 358 | readonly _HOMEKSHRC=true 359 | fi 360 | if test ! /etc/bash.bashrc -ef /etc/ksh.kshrc ; then 361 | test -r /etc/bash.bashrc && . /etc/bash.bashrc 362 | fi 363 | if test -n "$ENV" -a "$ENV" != "\$HOME/.kshrc" -a "$ENV" != "$HOME/.kshrc" -a -z "$_HOMEKSHRC" ; then 364 | # loop detection 365 | readonly _HOMEKSHRC=true 366 | test -r $HOME/.kshrc && . $HOME/.kshrc 367 | fi 368 | fi 369 | fi 370 | if test "$restricted" = true ; then 371 | PATH=/usr/lib/restricted/bin 372 | export PATH 373 | fi 374 | 375 | # 376 | # An X session 377 | # 378 | case "$-" in 379 | *i*) 380 | if test "$TERM" = "xterm" -a -O "$tty" -a -z "${SSH_TTY}" ; then 381 | echo "Directory: $PWD" 382 | # Last but not least 383 | date 384 | fi 385 | esac 386 | 387 | # 388 | # End of /etc/profile 389 | # 390 | -------------------------------------------------------------------------------- /files/etc/bash.bashrc: -------------------------------------------------------------------------------- 1 | # /etc/bash.bashrc for SUSE Linux 2 | # 3 | # PLEASE DO NOT CHANGE /etc/bash.bashrc There are chances that your changes 4 | # will be lost during system upgrades. Instead use /etc/bash.bashrc.local 5 | # for bash or /etc/ksh.kshrc.local for ksh or /etc/zsh.zshrc.local for the 6 | # zsh or /etc/ash.ashrc.local for the plain ash bourne shell for your local 7 | # settings, favourite global aliases, VISUAL and EDITOR variables, etc ... 8 | 9 | # 10 | # Check which shell is reading this file 11 | # 12 | noprofile=false 13 | restricted=false 14 | if test -z "$is" ; then 15 | if test -f /proc/mounts ; then 16 | if ! is=$(readlink /proc/$$/exe 2>/dev/null) ; then 17 | case "$0" in 18 | *pcksh) is=ksh ;; 19 | *) is=sh ;; 20 | esac 21 | fi 22 | case "$is" in 23 | */bash) is=bash 24 | while read -r -d $'\0' a ; do 25 | case "$a" in 26 | --noprofile) 27 | readonly noprofile=true ;; 28 | --restricted) 29 | readonly restricted=true ;; 30 | esac 31 | done < /proc/$$/cmdline 32 | case "$0" in 33 | sh|-sh|*/sh) 34 | is=sh ;; 35 | esac ;; 36 | */ash) is=ash ;; 37 | */dash) is=ash ;; 38 | */ksh) is=ksh ;; 39 | */ksh93) is=ksh ;; 40 | */pdksh) is=ksh ;; 41 | */mksh) is=ksh ;; 42 | */lksh) is=ksh ;; 43 | */*pcksh) is=ksh ;; 44 | */zsh) is=zsh ;; 45 | */*) is=sh ;; 46 | esac 47 | # 48 | # `r' in $- occurs *after* system files are parsed 49 | # 50 | for a in $SHELL ; do 51 | case "$a" in 52 | */r*sh) 53 | readonly restricted=true ;; 54 | -r*|-[!-]r*|-[!-][!-]r*) 55 | readonly restricted=true ;; 56 | --restricted) 57 | readonly restricted=true ;; 58 | esac 59 | done 60 | unset a 61 | else 62 | is=sh 63 | fi 64 | fi 65 | 66 | # 67 | # Call common progams from /bin or /usr/bin only 68 | # 69 | path () 70 | { 71 | if test -x /usr/bin/$1 ; then 72 | ${1+"/usr/bin/$@"} 73 | elif test -x /bin/$1 ; then 74 | ${1+"/bin/$@"} 75 | fi 76 | } 77 | 78 | 79 | # 80 | # ksh/ash sometimes do not know 81 | # 82 | test -z "$UID" && readonly UID=`path id -ur 2> /dev/null` 83 | test -z "$EUID" && readonly EUID=`path id -u 2> /dev/null` 84 | 85 | test -s /etc/profile.d/ls.bash && . /etc/profile.d/ls.bash 86 | 87 | # 88 | # Avoid trouble with Emacs shell mode 89 | # 90 | if test "$EMACS" = "t" ; then 91 | path tset -I -Q 92 | path stty cooked pass8 dec nl -echo 93 | fi 94 | 95 | # 96 | # Set prompt and aliases to something useful for an interactive shell 97 | # 98 | case "$-" in 99 | *i*) 100 | # 101 | # Set prompt to something useful 102 | # 103 | case "$is" in 104 | bash) 105 | # If COLUMNS are within the environment the shell should update 106 | # the winsize after each job otherwise the values are wrong 107 | case "$(declare -p COLUMNS 2> /dev/null)" in 108 | *-x*COLUMNS=*) shopt -s checkwinsize 109 | esac 110 | # Append history list instead of override 111 | shopt -s histappend 112 | # All commands of root will have a time stamp 113 | if test "$UID" -eq 0 ; then 114 | HISTTIMEFORMAT=${HISTTIMEFORMAT:-"%F %H:%M:%S "} 115 | fi 116 | # Force a reset of the readline library 117 | unset TERMCAP 118 | # 119 | # Returns short path (last two directories) 120 | # 121 | spwd () { 122 | ( IFS=/ 123 | set $PWD 124 | if test $# -le 3 ; then 125 | echo "$PWD" 126 | else 127 | eval echo \"..\${$(($#-1))}/\${$#}\" 128 | fi ) ; } 129 | # 130 | # Set xterm prompt with short path (last 18 characters) 131 | # 132 | if path tput hs 2>/dev/null || path tput -T $TERM+sl hs 2>/dev/null ; then 133 | # 134 | # Mirror prompt in terminal "status line", which for graphical 135 | # terminals usually is the window title. KDE konsole in 136 | # addition needs to have "%w" in the "tabs" setting, ymmv for 137 | # other console emulators. 138 | # 139 | if test "$TERM" = xterm ; then 140 | _tsl=$(echo -en '\e]2;') 141 | _isl=$(echo -en '\e]1;') 142 | _fsl=$(echo -en '\007') 143 | else 144 | _tsl=$(path tput tsl 2>/dev/null || path tput -T $TERM+sl tsl 2>/dev/null) 145 | _isl='' 146 | _fsl=$(path tput fsl 2>/dev/null || path tput -T $TERM+sl fsl 2>/dev/null) 147 | fi 148 | _sc=$(tput sc 2>/dev/null) 149 | _rc=$(tput rc 2>/dev/null) 150 | if test -n "$_tsl" -a -n "$_isl" -a "$_fsl" ; then 151 | TS1="$_sc$_tsl%s@%s:%s$_fsl$_isl%s$_fsl$_rc" 152 | elif test -n "$_tsl" -a "$_fsl" ; then 153 | TS1="$_sc$_tsl%s@%s:%s$_fsl$_rc" 154 | fi 155 | unset _isl _tsl _fsl _sc _rc 156 | ppwd () { 157 | local dir 158 | local -i width 159 | test -n "$TS1" || return; 160 | dir="$(dirs +0)" 161 | let width=${#dir}-18 162 | test ${#dir} -le 18 || dir="...${dir#$(printf "%.*s" $width "$dir")}" 163 | if test ${#TS1} -gt 17 ; then 164 | printf "$TS1" "$USER" "$HOST" "$dir" "$HOST" 165 | else 166 | printf "$TS1" "$USER" "$HOST" "$dir" 167 | fi 168 | } 169 | else 170 | ppwd () { true; } 171 | fi 172 | # If set: do not follow sym links 173 | # set -P 174 | # 175 | # Other prompting for root 176 | if test "$UID" -eq 0 ; then 177 | if test -n "$TERM" -a -t ; then 178 | _bred="$(path tput bold 2> /dev/null; path tput setaf 1 2> /dev/null)" 179 | _sgr0="$(path tput sgr0 2> /dev/null)" 180 | fi 181 | # Colored root prompt (see bugzilla #144620) 182 | if test -n "$_bred" -a -n "$_sgr0" ; then 183 | _u="\[$_bred\]\h" 184 | _p=" #\[$_sgr0\]" 185 | else 186 | _u="\h" 187 | _p=" #" 188 | fi 189 | unset _bred _sgr0 190 | else 191 | _u="\u@\h" 192 | _p=">" 193 | fi 194 | if test -z "$EMACS" -a -z "$MC_SID" -a "$restricted" != true -a \ 195 | -z "$STY" -a -n "$DISPLAY" -a ! -r $HOME/.bash.expert 196 | then 197 | _t="\[\$(ppwd)\]" 198 | else 199 | _t="" 200 | fi 201 | case "$(declare -p PS1 2> /dev/null)" in 202 | *-x*PS1=*) 203 | ;; 204 | *) 205 | # With full path on prompt 206 | PS1="${_t}${_u}:\w${_p} " 207 | # # With short path on prompt 208 | # PS1="${_t}${_u}:\$(spwd)${_p} " 209 | # # With physical path even if reached over sym link 210 | # PS1="${_t}${_u}:\$(pwd -P)${_p} " 211 | ;; 212 | esac 213 | unset _u _p _t 214 | ;; 215 | ash) 216 | cd () { 217 | local ret 218 | command cd "$@" 219 | ret=$? 220 | PWD=$(pwd) 221 | if test "$UID" = 0 ; then 222 | PS1="${HOST}:${PWD} # " 223 | else 224 | PS1="${USER}@${HOST}:${PWD}> " 225 | fi 226 | return $ret 227 | } 228 | cd . 229 | ;; 230 | ksh) 231 | # Some users of the ksh are not common with the usage of PS1. 232 | # This variable should not be exported, because normally only 233 | # interactive shells set this variable by default to ``$ ''. 234 | if test "${PS1-\$ }" = '$ ' -o "${PS1-\$ }" = '# ' ; then 235 | if test "$UID" = 0 ; then 236 | PS1="${HOST}:"'${PWD}'" # " 237 | else 238 | PS1="${USER}@${HOST}:"'${PWD}'"> " 239 | fi 240 | fi 241 | ;; 242 | zsh) 243 | # setopt chaselinks 244 | if test "$UID" = 0; then 245 | PS1='%n@%m:%~ # ' 246 | else 247 | PS1='%n@%m:%~> ' 248 | fi 249 | ;; 250 | *) 251 | if test "$UID" = 0 ; then 252 | PS1="${HOST}:"'${PWD}'" # " 253 | else 254 | PS1="${USER}@${HOST}:"'${PWD}'"> " 255 | fi 256 | ;; 257 | esac 258 | PS2='> ' 259 | 260 | if test "$is" = "ash" ; then 261 | # The ash shell does not have an alias builtin in 262 | # therefore we use functions here. This is a seperate 263 | # file because other shells may run into trouble 264 | # if they parse this even if they do not expand. 265 | test -s /etc/profile.d/alias.ash && . /etc/profile.d/alias.ash 266 | else 267 | test -s /etc/profile.d/alias.bash && . /etc/profile.d/alias.bash 268 | test -s $HOME/.alias && . $HOME/.alias 269 | fi 270 | 271 | # 272 | # Expert mode: if we find $HOME/.bash.expert we skip our settings 273 | # used for interactive completion and read in the expert file. 274 | # 275 | if test "$is" = "bash" -a -r $HOME/.bash.expert ; then 276 | . $HOME/.bash.expert 277 | elif test "$is" = "bash" ; then 278 | # Complete builtin of the bash 2.0 and higher 279 | case "$BASH_VERSION" in 280 | [2-9].*) 281 | if test -e /etc/bash_completion ; then 282 | . /etc/bash_completion 283 | elif test -s /etc/profile.d/bash_completion.sh ; then 284 | . /etc/profile.d/bash_completion.sh 285 | elif test -s /etc/profile.d/complete.bash ; then 286 | . /etc/profile.d/complete.bash 287 | fi 288 | # Do not source twice if already handled by bash-completion 289 | if [[ $BASH_COMPLETION_COMPAT_DIR != /etc/bash_completion.d ]]; then 290 | for s in /etc/bash_completion.d/*.sh ; do 291 | test -r $s && . $s 292 | done 293 | fi 294 | if test -e $HOME/.bash_completion ; then 295 | . $HOME/.bash_completion 296 | fi 297 | if test -f /etc/bash_command_not_found ; then 298 | . /etc/bash_command_not_found 299 | fi 300 | ;; 301 | *) ;; 302 | esac 303 | fi 304 | 305 | # Do not save dupes and lines starting by space in the bash history file 306 | HISTCONTROL=ignoreboth 307 | if test "$is" = "ksh" ; then 308 | # Use a ksh specific history file and enable 309 | # emacs line editor 310 | : ${HISTFILE=$HOME/.kshrc_history} 311 | : ${VISUAL=emacs} 312 | case $(set -o) in 313 | *multiline*) set -o multiline 314 | esac 315 | fi 316 | # command not found handler in zsh version 317 | if test "$is" = "zsh" ; then 318 | if test -f /etc/zsh_command_not_found ; then 319 | . /etc/zsh_command_not_found 320 | fi 321 | fi 322 | ;; 323 | esac 324 | 325 | # Source /etc/profile.d/vte.sh, which improvies usage of VTE based terminals. 326 | # It is vte.sh's responsibility to 'not load' when it's not applicable (not inside a VTE term) 327 | # If you want to 'disable' this functionality, set the sticky bit on /etc/profile.d/vte.sh 328 | if test -r /etc/profile.d/vte.sh -a ! -k /etc/profile.d/vte.sh; then 329 | . /etc/profile.d/vte.sh 330 | fi 331 | 332 | # 333 | # Just in case the user excutes a command with ssh or sudo 334 | # 335 | if test \( -n "$SSH_CONNECTION" -o -n "$SUDO_COMMAND" \) -a -z "$PROFILEREAD" -a "$noprofile" != true ; then 336 | _SOURCED_FOR_SSH=true 337 | . /etc/profile > /dev/null 2>&1 338 | unset _SOURCED_FOR_SSH 339 | fi 340 | 341 | # 342 | # Set GPG_TTY for curses pinentry 343 | # (see man gpg-agent and bnc#619295) 344 | # 345 | if test -t && type -p tty > /dev/null 2>&1 ; then 346 | GPG_TTY="`tty`" 347 | export GPG_TTY 348 | fi 349 | 350 | # 351 | # And now let us see if there is e.g. a local bash.bashrc 352 | # (for options defined by your sysadmin, not SUSE Linux) 353 | # 354 | case "$is" in 355 | bash) test -s /etc/bash.bashrc.local && . /etc/bash.bashrc.local ;; 356 | ksh) test -s /etc/ksh.kshrc.local && . /etc/ksh.kshrc.local ;; 357 | zsh) test -s /etc/zsh.zshrc.local && . /etc/zsh.zshrc.local ;; 358 | ash) test -s /etc/ash.ashrc.local && . /etc/ash.ashrc.local 359 | esac 360 | test -s /etc/sh.shrc.local && . /etc/sh.shrc.local 361 | 362 | if test "$restricted" = true -a -z "$PROFILEREAD" ; then 363 | PATH=/usr/lib/restricted/bin 364 | export PATH 365 | fi 366 | # 367 | # End of /etc/bash.bashrc 368 | # 369 | -------------------------------------------------------------------------------- /files/etc/rc.status: -------------------------------------------------------------------------------- 1 | # /etc/rc.status 2 | # vim: syntax=sh 3 | # Definition of boot script return messages 4 | # 5 | # The bootscripts should use the variables rc_done and rc_failed to 6 | # report whether they failed or succeeded. See /etc/init.d/skeleton for 7 | # an example how the shell functions rc_status and rc_reset are used. 8 | # 9 | # These functions make use of the variables rc_done and rc_failed; 10 | # rc_done_up and rc_failed_up are the same as rc_done and rc_failed 11 | # but contain a terminal code to move up one line before the output 12 | # of the actual string. (This is particularly useful when the script 13 | # starts a daemon which produces user output with a newline character) 14 | # 15 | # The variable rc_reset is used by the master resource control script 16 | # /etc/init.d/rc to turn off all attributes and switch to the standard 17 | # character set. 18 | # 19 | # \033 ascii ESCape 20 | # \033[G move to column (linux console, xterm, not vt100) 21 | # \033[C move columns forward but only upto last column 22 | # \033[D move columns backward but only upto first column 23 | # \033[A move rows up 24 | # \033[B move rows down 25 | # \033[1m switch on bold 26 | # \033[31m switch on red 27 | # \033[32m switch on green 28 | # \033[33m switch on yellow 29 | # \033[m switch off color/bold 30 | # \017 exit alternate mode (xterm, vt100, linux console) 31 | # \033[10m exit alternate mode (linux console) 32 | # \015 carriage return (without newline) 33 | # 34 | 35 | # Check if the service is used under systemd but not started with 36 | if test -z "$SYSTEMD_NO_WRAP" && /usr/bin/mountpoint -q /sys/fs/cgroup/systemd; then 37 | if test $PPID -ne 1 -a $# -eq 1 ; then 38 | _rc_base= 39 | _sd_opts= 40 | case "$0" in 41 | /etc/init.d/boot.*) 42 | _rc_base=${0##*/boot.} ;; 43 | /etc/init.d/*|/etc/rc.d/*) 44 | _rc_base=${0##*/} ;; 45 | */rc*) 46 | if test -L "$0"; then 47 | _rc_base=`readlink "$0"` 48 | _rc_base=${_rc_base##*/} 49 | case "$_rc_base" in 50 | boot.*) _rc_base=${_rc_base#boot.} 51 | esac 52 | else 53 | _rc_base=${0##*/rc} 54 | fi 55 | ;; 56 | esac 57 | _rc_system=$(/usr/bin/systemctl show --system --no-pager -p NeedDaemonReload \ 58 | -p UnitFileState -p LoadState "${_rc_base}.service" 2>/dev/null) 59 | case "$_rc_system" in 60 | *LoadState=masked*) 61 | echo "Error: ${_rc_base} is masked out and forbidden by systemd" 1>&2 62 | exit 2 ;; 63 | *UnitFileState=static*) 64 | echo "Skipped: ${_rc_base} is overwritten by a native systemd unit" 1>&2 65 | exit 2 ;; 66 | *NeedDaemonReload=yes*) 67 | /usr/bin/systemctl --system --no-pager daemon-reload 68 | esac 69 | unset _rc_system 70 | case "$1" in 71 | status) 72 | SYSTEMD_NO_WRAP=1 "$0" "$1" 73 | _sd_opts='--lines=0 --full --output=cat' 74 | ;; 75 | start|stop|reload|restart|try-restart|force-reload) 76 | echo "redirecting to systemctl $1 ${_rc_base}.service" 1>&2 77 | _sd_opts='--ignore-dependencies' 78 | ;; 79 | *) unset _rc_base 80 | esac 81 | if test -n "$_rc_base" -a -x /usr/bin/systemctl ; then 82 | exec /usr/bin/systemctl $_sd_opts $1 "${_rc_base}.service" 83 | fi 84 | unset _rc_base _sd_opts 85 | fi 86 | if test -z "$REDIRECT" -a -x /sbin/showconsole ; then 87 | REDIRECT="$(/sbin/showconsole 2>/dev/null)" 88 | test -z "$CONSOLE" && CONSOLE=/dev/console 89 | export REDIRECT CONSOLE 90 | fi 91 | fi 92 | 93 | # Do _not_ be fooled by non POSIX locale 94 | LC_ALL=POSIX 95 | export LC_ALL 96 | 97 | # Seek for terminal size and, if needed, set default size 98 | rc_lc () { 99 | if test -n "$REDIRECT" ; then 100 | set -- $(stty size < "$REDIRECT" 2> /dev/null || echo 0 0) 101 | else 102 | set -- $(stty size 2> /dev/null || echo 0 0) 103 | fi 104 | LINES=$1 105 | COLUMNS=$2 106 | if test $LINES -eq 0 -o $COLUMNS -eq 0; then 107 | LINES=24 108 | COLUMNS=80 109 | TERM=dumb 110 | fi 111 | } 112 | trap 'rc_lc' SIGWINCH 113 | test -n "$COLUMNS" -a -n "$LINES" || rc_lc 114 | export LINES COLUMNS 115 | 116 | # Make sure we have /sbin and /usr/sbin in PATH 117 | case ":$PATH:" in 118 | *:/sbin:*) 119 | ;; 120 | *) 121 | PATH=/sbin:/usr/sbin:/usr/local/sbin:$PATH 122 | export PATH 123 | ;; 124 | esac 125 | 126 | if test -t 1 -a "$TERM" != "raw" -a "$TERM" != "dumb"; then 127 | esc=`echo -en "\033"` 128 | extd="${esc}[1m" 129 | warn="${esc}[1;31m" 130 | done="${esc}[1;32m" 131 | attn="${esc}[1;33m" 132 | norm=`echo -en "${esc}[m\017"` 133 | stat=`echo -en "\015${esc}[${COLUMNS}C${esc}[10D"` 134 | 135 | rc_done="${stat}${done}done${norm}" 136 | rc_running="${stat}${done}running${norm}" 137 | rc_failed="${stat}${warn}failed${norm}" 138 | rc_missed="${stat}${warn}missing${norm}" 139 | rc_skipped="${stat}${attn}skipped${norm}" 140 | rc_dead="${stat}${warn}dead${norm}" 141 | rc_unused="${stat}${extd}unused${norm}" 142 | rc_unknown="${stat}${attn}unknown${norm}" 143 | rc_done_up="${esc}[1A${rc_done}" 144 | rc_failed_up="${esc}[1A${rc_failed}" 145 | rc_reset="${norm}${esc}[?25h" 146 | rc_save="${esc}7${esc}[?25l" 147 | rc_restore="${esc}8${esc}[?25h" 148 | rc_cuu () { test $1 -eq 0 && return; echo -en "\033[${1}A"; } 149 | rc_cud () { test $1 -eq 0 && return; echo -en "\033[${1}B"; } 150 | rc_timer_on () { 151 | # Draw seconds of running timout to column. 152 | # Two arguments: timeout in seconds and offset 153 | local n=$1 154 | local c=$2 155 | (trap "exit 0" SIGTERM 156 | while test $((n--)) -gt 0; do 157 | sleep 1; 158 | if test $n -gt 9 ; then 159 | echo -en "\015${esc}[${c}C(${n}s) " 160 | else 161 | echo -en "\015${esc}[${c}C( ${n}s) " 162 | fi 163 | done) & _rc_timer_pid=$! 164 | } 165 | rc_timer_off () { 166 | if test -n "$_rc_timer_pid" ; then 167 | kill -TERM $_rc_timer_pid > /dev/null 2>&1 168 | fi 169 | unset _rc_timer_pid 170 | } 171 | else 172 | esc="" 173 | extd="" 174 | warn="" 175 | done="" 176 | attn="" 177 | norm="" 178 | stat="" 179 | 180 | rc_done="..done" 181 | rc_running="..running" 182 | rc_failed="..failed" 183 | rc_missed="..missing" 184 | rc_skipped="..skipped" 185 | rc_dead="..dead" 186 | rc_unused="..unused" 187 | rc_unknown="..unknown" 188 | rc_done_up="${rc_done}" 189 | rc_failed_up="${rc_failed}" 190 | rc_reset="" 191 | rc_save="" 192 | rc_restore="" 193 | rc_cuu () { return; } 194 | rc_cud () { return; } 195 | rc_timer_on () { return; } 196 | rc_timer_off () { return; } 197 | fi 198 | 199 | _rc_service=${0##*/[SK][0-9][0-9]} 200 | _rc_status=0 201 | _rc_status_all=0 202 | _rc_todo=$1 203 | 204 | rc_check () 205 | { 206 | _rc_status_ret=$? 207 | test $_rc_status_ret -eq 0 || _rc_status=$_rc_status_ret 208 | test $_rc_status -eq 0 || _rc_status_all=$_rc_status 209 | return $_rc_status_ret 210 | } 211 | 212 | rc_reset () 213 | { 214 | _rc_status=0 215 | _rc_status_all=0 216 | rc_check 217 | return 0 218 | } 219 | 220 | if test "$_rc_todo" = "status" ; then 221 | rc_status () 222 | { 223 | rc_check 224 | _rc_status_ret=$_rc_status 225 | local i 226 | for i ; do 227 | case "$i" in 228 | -v|-v[1-9]|-v[1-9][0-9]) 229 | local vrt="" 230 | local out=1 231 | local opt="en" 232 | 233 | test -n "${i#-v}" && vrt=${esc:+"${esc}[${i#-v}A"} || opt="e" 234 | case "$_rc_status" in 235 | 0) vrt="$vrt$rc_running"; ;; # service running 236 | 1) vrt="$vrt$rc_dead" ; out=2 ;; # service dead (but has pid file) 237 | 2) vrt="$vrt$rc_dead" ; out=2 ;; # service dead (but has lock file) 238 | 3) vrt="$vrt$rc_unused" ; ;; # service not running 239 | 4) vrt="$vrt$rc_unknown"; ;; # status is unknown 240 | esac 241 | echo -$opt "$rc_save$vrt$rc_restore" 1>&$out 242 | 243 | # reset _rc_status to 0 after verbose case 244 | _rc_status=0 ;; 245 | -r) rc_reset ;; 246 | -s) echo -e "$rc_skipped" ; rc_failed 3 ;; 247 | -u) echo -e "$rc_unused" ; rc_failed 3 ;; 248 | *) echo "rc_status: Usage: [-v[] [-r]|-s|-u]" 1>&2 ; return 0 ;; 249 | esac 250 | done 251 | return $_rc_status_ret 252 | } 253 | elif test -n "$_rc_todo" ; then 254 | rc_status () 255 | { 256 | rc_check 257 | test "$_rc_status" -gt 7 && rc_failed 1 258 | _rc_status_ret=$_rc_status 259 | case "$_rc_todo" in 260 | stop) 261 | # program is not running which 262 | # is success if we stop service 263 | test "$_rc_status" -eq 7 && rc_failed 0 ;; 264 | esac 265 | local i 266 | for i ; do 267 | case "$i" in 268 | -v|-v[1-9]|-v[1-9][0-9]) 269 | local vrt="" 270 | local out=1 271 | local opt="en" 272 | 273 | test -n "${i#-v}" && vrt=${esc:+"${esc}[${i#-v}A"} || opt="e" 274 | case "$_rc_status" in 275 | 0) vrt="$vrt$rc_done" ; ;; # success 276 | 1) vrt="$vrt$rc_failed" ; out=2 ;; # generic or unspecified error 277 | 2) vrt="$vrt$rc_failed" ; out=2 ;; # invalid or excess args 278 | 3) vrt="$vrt$rc_missed" ; out=2 ;; # unimplemented feature 279 | 4) vrt="$vrt$rc_failed" ; out=2 ;; # insufficient privilege 280 | 5) vrt="$vrt$rc_skipped"; out=2 ;; # program is not installed 281 | 6) vrt="$vrt$rc_unused" ; out=2 ;; # program is not configured 282 | 7) vrt="$vrt$rc_failed" ; out=2 ;; # program is not running 283 | *) vrt="$vrt$rc_failed" ; out=2 ;; # unknown (maybe used in future) 284 | esac 285 | echo -$opt "$rc_save$vrt$rc_restore" 1>&$out 286 | 287 | # reset _rc_status to 0 after verbose case 288 | _rc_status=0 ;; 289 | -r) rc_reset ;; 290 | -s) echo -e "$rc_skipped" 1>&2 ; rc_failed 5 ;; 291 | -u) echo -e "$rc_unused" 1>&2 ; rc_failed 6 ;; 292 | *) echo "rc_status: Usage: [-v[] [-r]|-s|-u]" 1>&2 ; return 0 ;; 293 | esac 294 | done 295 | return $_rc_status_ret 296 | } 297 | else 298 | rc_status () 299 | { 300 | rc_check 301 | _rc_status_ret=$_rc_status 302 | local i 303 | for i ; do 304 | case "$i" in 305 | -v|-v[1-9]|-v[1-9][0-9]) 306 | local vrt="" 307 | local out=1 308 | local opt="en" 309 | 310 | test -n "${i#-v}" && vrt=${esc:+"${esc}[${i#-v}A"} || opt="e" 311 | case "$_rc_status" in 312 | 0) vrt="$vrt$rc_done" ; ;; # success 313 | *) vrt="$vrt$rc_failed"; out=2 ;; # failed 314 | esac 315 | echo -$opt "$rc_save$vrt$rc_restore" 1>&$out 316 | 317 | # reset _rc_status to 0 after verbose case 318 | _rc_status=0 ;; 319 | -r) rc_reset ;; 320 | -s) echo -e "$rc_skipped" ; return 0 ;; 321 | -u) echo -e "$rc_unused" ; return 0 ;; 322 | *) echo "rc_status: Usage: [-v[] [-r]|-s|-u]" 1>&2 ; return 0 ;; 323 | esac 324 | done 325 | return $_rc_status_ret 326 | } 327 | fi 328 | 329 | rc_failed () 330 | { 331 | rc_reset 332 | case "$1" in 333 | [0-7]) _rc_status=$1 ;; 334 | "") _rc_status=1 335 | esac 336 | rc_check 337 | return $_rc_status 338 | } 339 | 340 | rc_exit () 341 | { 342 | exit $_rc_status_all 343 | } 344 | 345 | rc_confirm() 346 | { 347 | local timeout="30" 348 | local answer="" 349 | local ret=0 350 | 351 | case "$1" in 352 | -t) timeout=$2; shift 2 ;; 353 | esac 354 | local message="$@, (Y)es/(N)o/(C)ontinue? [y] " 355 | : ${REDIRECT:=/dev/tty} 356 | 357 | while true ; do 358 | read -t ${timeout} -n 1 -p "${message}" answer < $REDIRECT > $REDIRECT 2>&1 359 | case "$answer" in 360 | [yY]|"") ret=0; break ;; 361 | [nN]) ret=1; break ;; 362 | [cC]) ret=2; break ;; 363 | *) echo; continue 364 | esac 365 | done 366 | echo 367 | return $ret 368 | } 369 | 370 | rc_active () 371 | { 372 | local link 373 | for link in /etc/init.d/*.d/S[0-9][0-9]${1} ; do 374 | test -e $link || break 375 | return 0 376 | done 377 | return 1 378 | } 379 | 380 | rc_splash() 381 | { 382 | return 0 383 | } 384 | 385 | # Wait between last SIGTERM and the next SIGKILL 386 | # any argument specify a *path* of a process which 387 | # process identity should *not* be checked. 388 | rc_wait() 389 | { 390 | local -i etime=$SECONDS 391 | 392 | if test -f /fastboot ; then 393 | let etime+=2 394 | else 395 | let etime+=6 396 | fi 397 | 398 | local -i pid 399 | local -i ppid=$$ 400 | local comm state rest 401 | local parent_processes="$ppid" 402 | 403 | while test $ppid -gt 1; do 404 | read -t 1 pid comm state ppid rest < /proc/$ppid/stat 405 | parent_processes="${parent_processes:+$parent_processes:}${ppid}" 406 | done 407 | for comm ; do 408 | test -s $comm || continue 409 | ppid="$(/sbin/pidofproc $comm 2> /dev/null)" || continue 410 | parent_processes="${parent_processes:+$parent_processes:}${ppid}" 411 | done 412 | unset comm state ppid rest 413 | 414 | local -i busy 415 | while test $SECONDS -lt $etime; do 416 | let busy=0 417 | for proc in /proc/[0-9]* ; do 418 | test -e $proc/exe || continue 419 | let pid=${proc##*/} 420 | case ":${parent_processes}:" in 421 | *:${pid}:*) continue 422 | esac 423 | let busy=pid 424 | break 425 | done 426 | test $busy -ne 0 || return 0 427 | usleep 500000 428 | done 429 | } 430 | 431 | rc_runlevel() 432 | { 433 | test -z "$RUNLEVEL" || return 434 | set -- $(/sbin/runlevel) 435 | PREVLEVEL=$1 436 | RUNLEVEL=$2 437 | export PREVLEVEL RUNLEVEL 438 | } 439 | 440 | cmdline="" 441 | rc_cmdline() 442 | { 443 | local arg cmd key val 444 | test -e /proc/cmdline || mount -nt proc proc /proc 445 | test -n "$cmdline" || read -t 2 cmdline < /proc/cmdline 446 | for arg; do 447 | for cmd in $cmdline ; do 448 | key="${cmd%%=*}" 449 | key="${key//-/_}" 450 | case "${key}" in 451 | $arg) 452 | case "$cmd" in 453 | *=*) val="${cmd#*=}" ;; 454 | *) val=yes 455 | esac 456 | echo $key=$val 457 | return 0 458 | esac 459 | done 460 | done 461 | return 1 462 | } 463 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | --------------------------------------------------------------------------------