Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:11.4
words
SuSEconfig.words
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File SuSEconfig.words of Package words
#! /bin/sh # Copyright (c) 2004 SuSE Linux AG, Nuernberg, Germany. All rights reserved. # # Author: Egmont Koblinger <egmont@suselinux.hu> # # This module maintains a symlink `english' pointing to either `american' # or `british' or `canadian'. # check if we are started as root # only one of UID and USER must be set correctly if test "$UID" != 0 -a "$USER" != root; then echo "You must be root to start $0." exit 1 fi test -f $ROOT/etc/sysconfig/suseconfig || { echo "No /etc/sysconfig/suseconfig found." && exit 1 ; } . $ROOT/etc/sysconfig/suseconfig test -f $ROOT/etc/sysconfig/language || { echo "No /etc/sysconfig/language found." && exit 1 ; } . $ROOT/etc/sysconfig/language test -f $ROOT/etc/sysconfig/words || { echo "No /etc/sysconfig/words found." && exit 1 ; } . $ROOT/etc/sysconfig/words if test -n "$ENABLE_SUSECONFIG" -a "$ENABLE_SUSECONFIG" = "no" ; then echo "SuSEconfig is disabled in $ROOT/etc/sysconfig/suseconfig. Exit..." exit 0 fi # which dictionaries are installed? if [ -f $ROOT/usr/share/dict/american ]; then INSTALLED_AMERICAN="yes" else INSTALLED_AMERICAN="no" fi if [ -f $ROOT/usr/share/dict/british ]; then INSTALLED_BRITISH="yes" else INSTALLED_BRITISH="no" fi if [ -f $ROOT/usr/share/dict/canadian ]; then INSTALLED_CANADIAN="yes" else INSTALLED_CANADIAN="no" fi # where should the link point to? LINK_TO="none" if [ "$INSTALLED_AMERICAN" = "yes" -a "$INSTALLED_BRITISH" = "no" -a "$INSTALLED_CANADIAN" = "no" ]; then LINK_TO="american" elif [ "$INSTALLED_AMERICAN" = "no" -a "$INSTALLED_BRITISH" = "yes" -a "$INSTALLED_CANADIAN" = "no" ]; then LINK_TO="british" elif [ "$INSTALLED_AMERICAN" = "no" -a "$INSTALLED_BRITISH" = "no" -a "$INSTALLED_CANADIAN" = "yes" ]; then LINK_TO="canadian" elif [ "$INSTALLED_AMERICAN" = "yes" -a "$INSTALLED_BRITISH" = "yes" ]; then for dict in $ENGLISH_WORDS; do if [ "$dict" = "system" ]; then case "$RC_LANG" in en_GB*) dict="british" ;; en*) dict="american" ;; *) continue ;; esac fi if [ -f $ROOT/usr/share/dict/$dict ]; then LINK_TO="$dict" break fi done fi if [ "$LINK_TO" = "none" ]; then # remove the links if necessary and if possible (modern `test' uses access(2)) test -L $ROOT/usr/share/dict/words -a -w $ROOT/usr/share/dict/ && \ rm -f $ROOT/usr/share/dict/words else # create the symbolic links otherwise test ! -e $ROOT/var/lib/dict/words -o -L $ROOT/var/lib/dict/words && \ ln -sf $ROOT/usr/share/dict/$LINK_TO $ROOT/var/lib/dict/words test ! -e $ROOT/usr/share/dict/words -a -w $ROOT/usr/share/dict/ && \ ln -sf $ROOT/var/lib/dict/words $ROOT/usr/share/dict/words fi exit 0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor