LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-21-2002, 02:48 PM   #1
islandkid
Member
 
Registered: Mar 2002
Location: Victoria, BC, Canada
Distribution: None (www.linuxfromscratch.org)
Posts: 103

Rep: Reputation: 15
small error in init script


This is a line from one of my init scripts (S05kudzu):
'action "Updating /etc/fstab" /usr/sbin/updfstab'

when this script is run at startup I get this error message:

/etc/rc.d/rc3.d/S05kudzu: action: command not found

Where do I get the 'action' command?
 
Old 03-21-2002, 03:03 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
"action" is a shell scripted function, not a program:

Code:
# Run some action. Log its output.
action() {
  STRING=$1
  echo -n "$STRING "
  shift
  initlog $INITLOG_ARGS -c "$*" && success $"$STRING" || failure $"$STRING"
  rc=$?
  echo
  return $rc
}
you should have this chunk of code in /etc/init.d/functions or similar, check to see if there's anything there like it. Have you upgraded this from somewhere? check some other scripts for the use of the action function... it's pretty common, also check that the sript file is sourcing the functions properly:

my kudzu script contains:

# Source function library.
. /etc/rc.d/init.d/functions

i wouldn't really recommend manually editing them however
 
Old 03-21-2002, 03:22 PM   #3
islandkid
Member
 
Registered: Mar 2002
Location: Victoria, BC, Canada
Distribution: None (www.linuxfromscratch.org)
Posts: 103

Original Poster
Rep: Reputation: 15
I see. ya, I don't have the action function in my functions script becuase I have a very old version of initscripts installed. I've tried upgrading, but in doesn't work too well. I get I pile of startup errors. My initscripts is one created for Caldera Openlinux edesktop. It is called SysVinit-scripts. I wish I could figure out how to get a more updated version or I'm going to end up with more and more errors as I upgrade to newer software versions. In this case adding a function 'action' to the functions script shouldn't harm anything since there was no previous function for it there.
 
Old 03-21-2002, 04:06 PM   #4
islandkid
Member
 
Registered: Mar 2002
Location: Victoria, BC, Canada
Distribution: None (www.linuxfromscratch.org)
Posts: 103

Original Poster
Rep: Reputation: 15
never mind. I understand how it all pieces together now. I think I can get the new initscripts to work.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
init.d script error bad interpreter snowmedia Red Hat 8 10-01-2011 06:16 PM
error: No init found. Try passing the init= option to the Kernel neylitalo Linux - Laptop and Netbook 3 01-22-2004 09:34 PM
error "Kernel panic: No init found. Try passing init= option Anauj0101 Linux - Newbie 3 05-06-2003 10:18 PM
Small Script msj Linux - Newbie 2 08-27-2001 06:59 AM
small script msj Programming 1 08-26-2001 11:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration