Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Error Emerging ati-drivers
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
palsyboy
Apprentice
Apprentice


Joined: 08 Jun 2004
Posts: 262
Location: USA

PostPosted: Thu Nov 18, 2004 8:59 pm    Post subject: Error Emerging ati-drivers Reply with quote

I'm working on my dad's box to see if I can get his Radeon 9800SE working. While emerging ati-drivers, I get the following error:

Code:

>>> Regenerating /etc/ld.so.cache...
 * Caching service dependencies...
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
/var/lib/init.d/depcache: line 1: #: command not found
>>> media-video/ati-drivers-3.14.1 merged.

>>> clean: No packages selected for removal.

>>> Auto-cleaning packages ...

>>> No outdated packages were found on your system.


 * GNU info directory index is up-to-date.


I don't know what this means, and google and these forums yielded nothing, so I tried looking at /var/lib/init.d/depcache to see if anything obvious stuck out for my n00bness:

Code:

source /sbin/functions.sh

need() {
   echo "NEED $*"; return 0
}

use() {
   echo "USE $*"; return 0
}

before() {
   echo "BEFORE $*"; return 0
}

after() {
   echo "AFTER $*"; return 0
}

provide() {
   echo "PROVIDE $*"; return 0
}

parallel() {
   echo "PARALLEL $*"; return 0
}

#*** /etc/init.d/esound ***

myservice="/etc/init.d/esound"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099778927"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     use net portmap alsasound
     return 0
  }

  depend
)

#*** /etc/init.d/famd ***

myservice="/etc/init.d/famd"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099816571"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
 
     need portmap
 
     return 0
  }

  depend
)

#*** /etc/init.d/gpm ***

myservice="/etc/init.d/gpm"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099985816"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     need localmount
     use hotplug logger
     return 0
  }

  depend
)

#*** /etc/init.d/hdparm ***

myservice="/etc/init.d/hdparm"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099740846"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     before bootmisc
     return 0
  }

  depend
)

#*** /etc/init.d/hostname ***

myservice="/etc/init.d/hostname"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099734090"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     need checkroot
     return 0
  }

  depend
)

#*** /etc/init.d/pg_autovacuum ***

myservice="/etc/init.d/pg_autovacuum"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099778412"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     need postgresql logger
     return 0
  }

  depend
)

#*** /etc/init.d/hotplug ***

myservice="/etc/init.d/hotplug"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099809925"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     need modules
     return 0
  }

  depend
)

#*** /etc/init.d/portmap ***

myservice="/etc/init.d/portmap"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099816442"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     need net
     before inetd
     before xinetd
     return 0
  }

  depend
)

#*** /etc/init.d/keymaps ***

myservice="/etc/init.d/keymaps"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099734090"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     need localmount
     return 0
  }

  depend
)

#*** /etc/init.d/postgresql ***

myservice="/etc/init.d/postgresql"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099778412"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     use net
     return 0
  }

  depend
)

#*** /etc/init.d/lisa ***

myservice="/etc/init.d/lisa"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099864035"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
      use net
     return 0
  }

  depend
)

#*** /etc/init.d/reslisa ***

myservice="/etc/init.d/reslisa"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099864035"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
      use net
     return 0
  }

  depend
)

#*** /etc/init.d/rmnologin ***

myservice="/etc/init.d/rmnologin"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099734090"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     need localmount
     return 0
  }

  depend
)

#*** /etc/init.d/rsyncd ***

myservice="/etc/init.d/rsyncd"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099740359"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     use net
     return 0
  }

  depend
)

#*** /etc/init.d/samba ***

myservice="/etc/init.d/samba"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099814453"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     need net
     use cupsd
     return 0
  }

  depend
)

#*** /etc/init.d/serial ***

myservice="/etc/init.d/serial"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099734090"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     need localmount
     return 0
  }

  depend
)

#*** /etc/init.d/bootmisc ***

myservice="/etc/init.d/bootmisc"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099734090"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     need clock localmount hostname
     before logger
     return 0
  }

  depend
)

#*** /etc/init.d/checkfs ***

myservice="/etc/init.d/checkfs"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099734090"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     need checkroot modules
     return 0
  }

  depend
)

#*** /etc/init.d/checkroot ***

myservice="/etc/init.d/checkroot"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099734090"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     before *
     return 0
  }

  depend
)

#*** /etc/init.d/clock ***

myservice="/etc/init.d/clock"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099734090"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     need localmount
     return 0
  }

  depend
)

#*** /etc/init.d/consolefont ***

myservice="/etc/init.d/consolefont"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099734090"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     need localmount
     after hotplug
     return 0
  }

  depend
)

#*** /etc/init.d/crypto-loop ***

myservice="/etc/init.d/crypto-loop"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099734090"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
      need checkroot modules
      before localmount
     return 0
  }

  depend
)

#*** /etc/init.d/cupsd ***

myservice="/etc/init.d/cupsd"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099783176"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     use net
     after logger
     before nfs
     use vmware
     use hotplug
     return 0
  }

  depend
)

#*** /etc/init.d/domainname ***

myservice="/etc/init.d/domainname"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099734090"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     need checkroot hostname
     before bootmisc
     return 0
  }

  depend
)

#*** /etc/init.d/local ***

myservice="/etc/init.d/local"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099734090"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     after *
     return 0
  }

  depend
)

#*** /etc/init.d/localmount ***

myservice="/etc/init.d/localmount"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099734090"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     need checkfs
     return 0
  }

  depend
)

#*** /etc/init.d/metalog ***

myservice="/etc/init.d/metalog"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099810939"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     need clock hostname
     provide logger
     return 0
  }

  depend
)

#*** /etc/init.d/modules ***

myservice="/etc/init.d/modules"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099734090"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     need checkroot hostname
     use isapnp
     return 0
  }

  depend
)

#*** /etc/init.d/nas ***

myservice="/etc/init.d/nas"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099782806"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     need net
     after alsasound esd
     return 0
  }

  depend
)

#*** /etc/init.d/net.eth0 ***

myservice="/etc/init.d/net.eth0"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099734090"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     use hotplug pcmcia
     return 0
  }

  depend
)

#*** /etc/init.d/net.lo ***

myservice="/etc/init.d/net.lo"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099734090"

#*** /etc/init.d/netmount ***

myservice="/etc/init.d/netmount"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099734090"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     local myneed="net"
     local myuse=""
     
     local nfsmounts="$(awk '!/^#/ && $3 == "nfs" && $4 !~ /noauto/ { print $0 }' /etc/fstab)"
     
     if [ -n "${nfsmounts}" ]
     then
        local myneed="${myneed} portmap"
        local myuse="${myuse} nfs"
     fi
 
     need ${myneed}
     use ${myuse}
     return 0
  }

  depend
)

#*** /etc/init.d/slpd ***

myservice="/etc/init.d/slpd"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099782906"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     need net
     return 0
  }

  depend
)

#*** /etc/init.d/nscd ***

myservice="/etc/init.d/nscd"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099739965"

#*** /etc/init.d/sshd ***

myservice="/etc/init.d/sshd"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099742018"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     use logger dns
     need net
     return 0
  }

  depend
)

#*** /etc/init.d/numlock ***

myservice="/etc/init.d/numlock"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099734090"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     need localmount
     return 0
  }

  depend
)

#*** /etc/init.d/urandom ***

myservice="/etc/init.d/urandom"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1099734090"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     need localmount
     return 0
  }

  depend
)

#*** /etc/init.d/vixie-cron ***

myservice="/etc/init.d/vixie-cron"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1100105079"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     use logger
     need clock localmount
     provide cron   
     return 0
  }

  depend
)

#*** /etc/init.d/xdm ***

myservice="/etc/init.d/xdm"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1100291213"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     use xfs hotplug
     return 0
  }

  depend
)

#*** /etc/init.d/xfs ***

myservice="/etc/init.d/xfs"
myservice="${myservice##*/}"
echo "RCSCRIPT ${myservice}"

echo "MTIME 1100291213"

(
  # Get settings for rc-script ...
  [ -e /etc/conf.d/basic ]                 && source /etc/conf.d/basic

  [ -e "/etc/conf.d/${myservice}" ]        && source "/etc/conf.d/${myservice}"

  [ -e /etc/conf.d/net ]                   && \
  [ "${myservice%%.*}" = "net" ]           && \
  [ "${myservice##*.}" != "${myservice}" ] && source /etc/conf.d/net

  [ -e /etc/rc.conf ]                      && source /etc/rc.conf

  depend() {
    return 0
  }

  # Actual depend() function ...
  depend() {
     use logger
     return 0
  }

  depend
)

Well, that's what I got, and I don't know what's wrong. Can someone please help me out? Thanks.
Back to top
View user's profile Send private message
RageAgainstTheMachine
n00b
n00b


Joined: 30 Sep 2004
Posts: 14
Location: Frogstar world A

PostPosted: Thu Nov 18, 2004 9:05 pm    Post subject: Reply with quote

Well as it seems to be referring to line 1 which is:
Code:
source /sbin/functions.sh


Do you have the file /sbin/functions.sh?

try (as root)

Code:
locate functions.sh


and see if you have it, and where it is...
_________________
RageAgainstTheMachine
--
What is the ultimate answer to Life, The Universe and Everything? 42
KDE is kool!
--
Gentoo on a Dell inspiron 5100
P4 2.66
512MB RAM
40GIG HDD + 200GIG External 7200 8MB HDD
Back to top
View user's profile Send private message
palsyboy
Apprentice
Apprentice


Joined: 08 Jun 2004
Posts: 262
Location: USA

PostPosted: Thu Nov 18, 2004 9:12 pm    Post subject: Reply with quote

Thank you for your help. I have it, both at /etc/init.d/functions.sh and at /sbin/functions.sh. Here's what /sbin/functions.sh says:
Code:

# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /home/cvsroot/gentoo-src/rc-scripts/sbin/functions.sh,v 1.52 2004/05/21 15:22:12 agriffis Exp $

RC_GOT_FUNCTIONS="yes"

# daemontools dir
SVCDIR="/var/lib/supervise"

# Check /etc/conf.d/rc for a description of these ...
svcdir="/var/lib/init.d"
svclib="/lib/rcscripts"
svcmount="no"
svcfstype="tmpfs"
svcsize=1024

# Different types of dependencies
deptypes="need use"
# Different types of order deps
ordtypes="before after"

#
# Internal variables
#

# Dont output to stdout?
RC_QUIET_STDOUT="no"

# Should we use color?
RC_NOCOLOR="no"


#
# Default values for rc system
#
RC_TTY_NUMBER=11
RC_NET_STRICT_CHECKING="no"
RC_PARALLEL_STARTUP="no"
RC_USE_CONFIG_PROFILE="yes"

# Override defaults with user settings ...
[ -f /etc/conf.d/rc ] && source /etc/conf.d/rc

# void splash(...)
#
#  Notify bootsplash/splashutils/gensplash/whatever about
#  important events.
#
splash() {
        return 0
}

# This will override the splash() function...
[ -f /sbin/splash-functions.sh ] && source /sbin/splash-functions.sh

# void get_bootconfig()
#
#    Get the BOOTLEVEL and SOFTLEVEL by setting
#    'bootlevel' and 'softlevel' via kernel
#    parameters.
#
get_bootconfig() {
        local copt=
        local newbootlevel=
        local newsoftlevel=

        for copt in $(< /proc/cmdline)
        do
                case "${copt%=*}" in
                        "bootlevel")
                                newbootlevel="${copt##*=}"
                                ;;
                        "softlevel")
                                newsoftlevel="${copt##*=}"
                                ;;
                esac
        done

        if [ -n "${newbootlevel}" ]
        then
                export BOOTLEVEL="${newbootlevel}"
        else
                export BOOTLEVEL="boot"
        fi

        if [ -n "${newsoftlevel}" ]
        then
                export DEFAULTLEVEL="${newsoftlevel}"
        else
                export DEFAULTLEVEL="default"
        fi

        return 0
}

setup_defaultlevels() {
        get_bootconfig

        if get_bootparam "noconfigprofile"
        then
                export RC_USE_CONFIG_PROFILE="no"

        elif get_bootparam "configprofile"
        then
                export RC_USE_CONFIG_PROFILE="yes"
        fi

        if [ "${RC_USE_CONFIG_PROFILE}" = "yes" -a -n "${DEFAULTLEVEL}" ] && \
           [ -d "/etc/runlevels/${BOOTLEVEL}.${DEFAULTLEVEL}" -o \
             -L "/etc/runlevels/${BOOTLEVEL}.${DEFAULTLEVEL}" ]
        then
                export BOOTLEVEL="${BOOTLEVEL}.${DEFAULTLEVEL}"
        fi

        if [ -z "${SOFTLEVEL}" ]
        then
                if [ -f "${svcdir}/softlevel" ]
                then
                        export SOFTLEVEL="$(< ${svcdir}/softlevel)"
                else
                        export SOFTLEVEL="${BOOTLEVEL}"
                fi
        fi

        return 0
}

# void esyslog(char* priority, char* tag, char* message)
#
#    use the system logger to log a message
#
esyslog() {
        local pri=
        local tag=

        if [ -x /usr/bin/logger ]
        then
                pri="$1"
                tag="$2"

                shift 2
                [ -z "$*" ] && return 0

                /usr/bin/logger -p "${pri}" -t "${tag}" -- "$*"
        fi

        return 0
}

# void einfo(char* message)
#
#    show an informative message (with a newline)
#
einfo() {
        if [ "${RC_QUIET_STDOUT}" != "yes" ]
        then
                echo -e " ${GOOD}*${NORMAL} ${*}"
        fi

        return 0
}

# void einfon(char* message)
#
#    show an informative message (without a newline)
#
einfon() {
        if [ "${RC_QUIET_STDOUT}" != "yes" ]
        then
                echo -ne " ${GOOD}*${NORMAL} ${*}"
        fi

        return 0
}

# void ewarn(char* message)
#
#    show a warning message + log it
#
ewarn() {
        if [ "${RC_QUIET_STDOUT}" = "yes" ]
        then
                echo " ${*}"
        else
                echo -e " ${WARN}*${NORMAL} ${*}"
        fi

        # Log warnings to system log
        esyslog "daemon.warning" "rc-scripts" "${*}"

        return 0
}

# void eerror(char* message)
#
#    show an error message + log it
#
eerror() {
        if [ "${RC_QUIET_STDOUT}" = "yes" ]
        then
                echo " ${*}" >/dev/stderr
        else
                echo -e " ${BAD}*${NORMAL} ${*}"
        fi

        # Log errors to system log
        esyslog "daemon.err" "rc-scripts" "${*}"

        return 0
}

# void ebegin(char* message)
#
#    show a message indicating the start of a process
#
ebegin() {
        if [ "${RC_QUIET_STDOUT}" != "yes" ]
        then
                if [ "${RC_NOCOLOR}" = "yes" ]
                then
                        echo -ne " ${GOOD}*${NORMAL} ${*}..."
                else
                        echo -e " ${GOOD}*${NORMAL} ${*}..."
                fi
        fi

        return 0
}

# void eend(int error, char* errstr)
#
#    indicate the completion of process
#    if error, show errstr via eerror
#
eend() {
        local retval=

        if [ "$#" -eq 0 ] || ([ -n "$1" ] && [ "$1" -eq 0 ])
        then
                if [ "${RC_QUIET_STDOUT}" != "yes" ]
                then
                        echo -e "${ENDCOL}  ${BRACKET}[ ${GOOD}ok${BRACKET} ]${NORMAL}"
                fi
        else
                retval="$1"

                if [ -c /dev/null ] ; then
                        rc_splash "stop" &>/dev/null &
                else
                        rc_splash "stop" &
                fi

                if [ "$#" -ge 2 ]
                then
                        shift
                        eerror "${*}"
                fi
                if [ "${RC_QUIET_STDOUT}" != "yes" ]
                then
                        echo -e "${ENDCOL}  ${BRACKET}[ ${BAD}!!${BRACKET} ]${NORMAL}"
                        # extra spacing makes it easier to read
                        echo
                fi
                return ${retval}
        fi

        return 0
}

# void ewend(int error, char *warnstr)
#
#    indicate the completion of process
#    if error, show warnstr via ewarn
#
ewend() {
        local retval=

        if [ "$#" -eq 0 ] || ([ -n "$1" ] && [ "$1" -eq 0 ])
        then
                if [ "${RC_QUIET_STDOUT}" != "yes" ]
                then
                        echo -e "${ENDCOL}  ${BRACKET}[ ${GOOD}ok${BRACKET} ]${NORMAL}"
                fi
        else
                retval="$1"
                if [ "$#" -ge 2 ]
                then
                        shift
                        ewarn "${*}"
                fi
                if [ "${RC_QUIET_STDOUT}" != "yes" ]
                then
                        echo -e "${ENDCOL}  ${BRACKET}[ ${WARN}!!${BRACKET} ]${NORMAL}"
                        # extra spacing makes it easier to read
                        echo
                fi
                return "${retval}"
        fi

        return 0
}

# bool wrap_rcscript(full_path_and_name_of_rc-script)
#
#    check to see if a given rc-script has syntax errors
#    zero == no errors
#    nonzero == errors
#
wrap_rcscript() {
        local retval=1
        local myservice="${1##*/}"

        ( echo "function test_script() {" ; cat "$1"; echo "}" ) \
                > "${svcdir}/${myservice}-$$"

        if source "${svcdir}/${myservice}-$$" &> /dev/null
        then
                test_script &> /dev/null
                retval=0
        fi
        rm -f "${svcdir}/${myservice}-$$"

        return "${retval}"
}

# char *KV_major(string)
#
#    Return the Major version part of given kernel version.
#
KV_major() {
        local KV=

        [ -z "$1" ] && return 1

        KV="$(echo "$1" | \
                awk '{ tmp = $0; gsub(/^[0-9\.]*/, "", tmp); sub(tmp, ""); print }')"
        echo "${KV}" | awk -- 'BEGIN { FS = "." } { print $1 }'

        return 0
}

# char *KV_minor(string)
#
#    Return the Minor version part of given kernel version.
#
KV_minor() {
        local KV=

        [ -z "$1" ] && return 1

        KV="$(echo "$1" | \
                awk '{ tmp = $0; gsub(/^[0-9\.]*/, "", tmp); sub(tmp, ""); print }')"
        echo "${KV}" | awk -- 'BEGIN { FS = "." } { print $2 }'

        return 0
}

# char *KV_micro(string)
#
#    Return the Micro version part of given kernel version.
#
KV_micro() {
        local KV=

        [ -z "$1" ] && return 1

        KV="$(echo "$1" | \
                awk '{ tmp = $0; gsub(/^[0-9\.]*/, "", tmp); sub(tmp, ""); print }')"
        echo "${KV}" | awk -- 'BEGIN { FS = "." } { print $3 }'

        return 0
}

# int KV_to_int(string)
#
#    Convert a string type kernel version (2.4.0) to an int (132096)
#    for easy compairing or versions ...
#
KV_to_int() {
        local KV_MAJOR=
        local KV_MINOR=
        local KV_MICRO=
        local KV_int=

        [ -z "$1" ] && return 1

        KV_MAJOR="$(KV_major "$1")"
        KV_MINOR="$(KV_minor "$1")"
        KV_MICRO="$(KV_micro "$1")"
        KV_int="$((KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO))"

        # We make version 2.2.0 the minimum version we will handle as
        # a sanity check ... if its less, we fail ...
        if [ "${KV_int}" -ge 131584 ]
        then
                echo "${KV_int}"

                return 0
        fi

        return 1
}

# int get_KV()
#
#    return the kernel version (major, minor and micro concated) as an integer
#
get_KV() {
        local KV="$(uname -r)"

        echo "$(KV_to_int "${KV}")"

        return $?
}

# bool get_bootparam(param)
#
#   return 0 if gentoo=param was passed to the kernel
#
#   EXAMPLE:  if get_bootparam "nodevfs" ; then ....
#
get_bootparam() {
        local x copt params retval=1

        [ ! -e "/proc/cmdline" ] && return 1

        for copt in $(< /proc/cmdline)
        do
                if [ "${copt%=*}" = "gentoo" ]
                then
                        params="$(gawk -v PARAMS="${copt##*=}" '
                                BEGIN {
                                        split(PARAMS, nodes, ",")
                                        for (x in nodes)
                                                print nodes[x]
                                }')"

                        # Parse gentoo option
                        for x in ${params}
                        do
                                if [ "${x}" = "$1" ]
                                then
#                                       echo "YES"
                                        retval=0
                                fi
                        done
                fi
        done

        return ${retval}
}

# Safer way to list the contents of a directory,
# as it do not have the "empty dir bug".
#
# char *dolisting(param)
#
#    print a list of the directory contents
#
#    NOTE: quote the params if they contain globs.
#          also, error checking is not that extensive ...
#
dolisting() {
        local x=
        local y=
        local tmpstr=
        local mylist=
        local mypath="${*}"

        if [ "${mypath%/\*}" != "${mypath}" ]
        then
                mypath="${mypath%/\*}"
        fi

        for x in ${mypath}
        do
                [ ! -e "${x}" ] && continue

                if [ ! -d "${x}" ] && ( [ -L "${x}" -o -f "${x}" ] )
                then
                        mylist="${mylist} $(ls "${x}" 2> /dev/null)"
                else
                        [ "${x%/}" != "${x}" ] && x="${x%/}"

                        cd "${x}"; tmpstr="$(ls)"

                        for y in ${tmpstr}
                        do
                                mylist="${mylist} ${x}/${y}"
                        done
                fi
        done

        echo "${mylist}"
}

# void save_options(char *option, char *optstring)
#
#    save the settings ("optstring") for "option"
#
save_options() {
        local myopts="$1"

        shift
        if [ ! -d "${svcdir}/options/${myservice}" ]
        then
                mkdir -p -m 0755 "${svcdir}/options/${myservice}"
        fi

        echo "$*" > "${svcdir}/options/${myservice}/${myopts}"

        return 0
}

# char *get_options(char *option)
#
#    get the "optstring" for "option" that was saved
#    by calling the save_options function
#
get_options() {
        if [ -f "${svcdir}/options/${myservice}/$1" ]
        then
                echo "$(< ${svcdir}/options/${myservice}/$1)"
        fi

        return 0
}

# char *add_suffix(char * configfile)
#
#    Returns a config file name with the softlevel suffix
#    appended to it.  For use with multi-config services.
add_suffix() {
        if [ "${RC_USE_CONFIG_PROFILE}" = "yes" -a -e "$1.${DEFAULTLEVEL}" ]
        then
                echo "$1.${DEFAULTLEVEL}"
        else
                echo "$1"
        fi

        return 0
}

getcols() {
        echo "$2"
}

if [ -z "${EBUILD}" ]
then
        # Setup a basic $PATH.  Just add system default to existing.
        # This should solve both /sbin and /usr/sbin not present when
        # doing 'su -c foo', or for something like:  PATH= rcscript start
        PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:${PATH}"

        if [ "$(/sbin/consoletype 2> /dev/null)" = "serial" ]
        then
                # We do not want colors on serial terminals
                RC_NOCOLOR="yes"
        fi

        for arg in $*
        do
                case "${arg}" in
                        # Lastly check if the user disabled it with --nocolor argument
                        --nocolor)
                                RC_NOCOLOR="yes"
                                ;;
                esac
        done

        if [ -e "/proc/cmdline" ]
        then
                setup_defaultlevels
        fi

else
        # Should we use colors ?
        if [ "${*/depend}" = "$*" ]
        then
                # Check user pref in portage
                RC_NOCOLOR="$(portageq envvar NOCOLOR 2>/dev/null)"

                [ "${RC_NOCOLOR}" = "true" ] && RC_NOCOLOR="yes"
        else
                # We do not want colors or stty to run during emerge depend
                RC_NOCOLOR="yes"
        fi
fi

if [ "${RC_NOCOLOR}" = "yes" ]
then
        COLS="25 80"
        ENDCOL=

        GOOD=
        WARN=
        BAD=
        NORMAL=
        HILITE=
        BRACKET=

        if [ -n "${EBUILD}" ] && [ "${*/depend}" = "$*" ]
        then
                stty cols 80 &>/dev/null
                stty rows 25 &>/dev/null
        fi
else
        COLS="`stty size 2> /dev/null`"
        COLS="`getcols ${COLS}`"
        COLS=$((${COLS} - 7))
        ENDCOL=$'\e[A\e['${COLS}'G'    # Now, ${ENDCOL} will move us to the endof the
                                       # column;  irregardless of character width

        GOOD=$'\e[32;01m'
        WARN=$'\e[33;01m'
        BAD=$'\e[31;01m'
        NORMAL=$'\e[0m'
        HILITE=$'\e[36;01m'
        BRACKET=$'\e[34;01m'
fi


# vim:ts=4
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum