JP Vossen on 22 Jan 2014 11:38:22 -0800

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] network service errors

On 01/22/2014 12:33 PM, Carl Johnson wrote:
Whenever I do anything with the network service on this centos 6.5 box I

"./network-functions: line 155: is_false: command not found"

So something's wrong with network-functions I guess? Or would it be the
init script that references it?

This stems from me trying to figure out why the nfs mounts that I've
specified in fstab that SHOULD be mounted on boot, don't work. They do
however work with "mount -a". Am I barking up the wrong tree?

Is the the same box as the VBox issues? I'm starting to suspect some other systemic problem, because init scripts from the package system should Just Work. Since that seems not to be the case, I'm wondering what else is going on. Have you installed stuff from source, or not "stock" repos or something? That way lies madness and pain...or learning a lot about t-shooting and debugging... And I'll preempt Rich and say that either way, you should consider Gentoo... ;-)

That said, all the advice from the last issue holds true here too. On my drop-dead stock CentOS-6.5 VM:

/root# grep -R 'is_false' /etc/*
/etc/init.d/functions:is_false() {
/etc/rc.d/init.d/functions:is_false() {
/etc/sysconfig/network-scripts/network-functions: ! is_false $NM_CONTROLLED && is_nm_running && USE_NM=true

Note: '/etc/init.d/' is a symlink to '/etc/rc.d/init.d/' so that 'functions' file is the same...

So the function exists, but isn't being sourced ('help source' or 'help .', think #INCLUDE) for some reason.

### Yup, it's there...
/root# cat -n /etc/sysconfig/network-scripts/network-functions | grep 'is_false'
   155      ! is_false $NM_CONTROLLED && is_nm_running && USE_NM=true

### Add maybe being sourced...  (help test | grep -- '-z')
/root# cat -n /etc/sysconfig/network-scripts/network-functions | grep '/functions'
    10  [ -z "$__sed_discard_ignored_files" ] && . /etc/init.d/functions

### More context...
/root# cat -n /etc/sysconfig/network-scripts/network-functions | head
     1  # -*-Shell-script-*-
     2  #
3 # This file is not a stand-alone shell script; it provides functions
     4  # to network scripts that source it.
     6  # Set up a default search path.
     7  PATH="/sbin:/usr/sbin:/bin:/usr/bin"
     8  export PATH
    10  [ -z "$__sed_discard_ignored_files" ] && . /etc/init.d/functions

### This is fundamental
/root# rpm -q --whatprovides /etc/sysconfig/network-scripts/network-functions

Hope this is useful,
JP Vossen, CISSP            |:::======|
My Account, My Opinions     |=========|
"Microsoft Tax" = the additional hardware & yearly fees for the add-on
software required to protect Windows from its own poorly designed and
implemented self, while the overhead incidentally flattens Moore's Law.
Philadelphia Linux Users Group         --
Announcements -
General Discussion  --