LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-20-2004, 09:02 PM   #16
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Original Poster
Rep: Reputation: Disabled

LQers

Thanks for the comments so far, I have editted and rebooted to the same problem, no echos after cups but I am posting a slightly different version of the rc.M file so you can see line numbers that I use in Kwrite and then onwards to requests.....

##########################end of rc.M starts#####################
# Update the X font indexes:
if [ -x /usr/X11R6/bin/fc-cache ]; then
echo "Updating X font indexes: /usr/X11R6/bin/fc-cache"
/usr/X11R6/bin/fc-cache
fi
echo line 78

# Start the local setup procedure.
/etc/rc.d/rc.local
echo line 82 ok

# Start the print spooling system.
if [ -x /etc/rc.d/rc.cups ]; then
. /etc/rc.d/rc.cups start
echo line 87

# Start atd (manages jobs scheduled with 'at'):
if [ -x /usr/sbin/atd ]; then
/usr/sbin/atd -b 15 -l 1
fi
echo line 93

# Start the APM daemon if APM is enabled in the kernel:
if [ -x /usr/sbin/apmd ]; then
if cat /proc/apm 1> /dev/null 2> /dev/null ; then
echo "Starting APM daemon: /usr/sbin/apmd"
/usr/sbin/apmd
fi
fi
echo line 102

# Start the ACPI (Advanced Configuration and Power Interface) daemon:
if [ -x /etc/rc.d/rc.acpid ]; then
. /etc/rc.d/rc.acpid start
fi
echo line 108

# Load ALSA (sound) defaults:
#if [ -x /etc/rc.d/rc.alsa ]; then
# . /etc/rc.d/rc.alsa
#fi
echo line 114

# Load a custom screen font if the user has an rc.font script.
if [ -x /etc/rc.d/rc.font ]; then
. /etc/rc.d/rc.font
fi
echo line 120

# Load a custom keymap if the user has an rc.keymap script.
if [ -x /etc/rc.d/rc.keymap ]; then
. /etc/rc.d/rc.keymap
fi
echo line 126

# Start the GPM mouse server:
if [ -x /etc/rc.d/rc.gpm ]; then
. /etc/rc.d/rc.gpm start
fi
echo line 132

# If there are SystemV init scripts for this runlevel, run them.
if [ -x /etc/rc.d/rc.sysvinit ]; then
. /etc/rc.d/rc.sysvinit
fi
echo line 138 end of M M M

############################### end of file##################

Now with this new fragment on BOOT I can see my local file action my commands like a good computer should,
I see the continued echos up to line 82
then the boot message that cups starts

I see no echos for line 87 onwards and no messages that the relevant files are actioning.

I don't know if this modified file is more confusing to you than my last, but what has me stumped is simple echos are not working.

The boot messages jump from cups to login screen. I have already tested sleep delays and know its not my poor eyesight.

Any clues?
 
Old 04-21-2004, 01:52 AM   #17
portux
Member
 
Registered: Apr 2003
Location: Portugal
Distribution: Slackware 10.1
Posts: 42

Rep: Reputation: 15
Did you check rc.cups ? Can you post it ?

IMHO the problems is either with with the script or with cups itself.
 
Old 04-21-2004, 03:07 AM   #18
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
It must be out of place. With it there then everything under that depends on CUPS being present and executable, which just can't be right.
My rc.M has a closing 'fi' for CUPS and then the rest follows. I don't have CUPS installed, so I don't know what's in rc.cups. Could you post it?
I would try moving the closing fi up to the rc.cups section.
 
Old 04-21-2004, 09:39 AM   #19
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Original Poster
Rep: Reputation: Disabled
Thankyou all for your suggestions, I added one then added two fi without success first file is my rc.cups and second is the output of running rc.M in su mode piped to a file

#####################rc.cups##################################
#!/bin/sh
#
# "$Id: cups.sh.in,v 1.22 2002/12/17 18:56:27 swdev Exp $"
#
# Startup/shutdown script for the Common UNIX Printing System (CUPS).
#
# Copyright 1997-2003 by Easy Software Products, all rights reserved.
#
# These coded instructions, statements, and computer programs are the
# property of Easy Software Products and are protected by Federal
# copyright law. Distribution and use rights are outlined in the file
# "LICENSE.txt" which should have been included with this file. If this
# file is missing or damaged please contact Easy Software Products
# at:
#
# Attn: CUPS Licensing Information
# Easy Software Products
# 44141 Airport View Drive, Suite 204
# Hollywood, Maryland 20636-3111 USA
#
# Voice: (301) 373-9603
# EMail: cups-info@cups.org
# WWW: http://www.cups.org
#

#### OS-Dependent Information

#
# Linux chkconfig stuff:
#
# chkconfig: 235 99 00
# description: Startup/shutdown script for the Common UNIX \
# Printing System (CUPS).
#

#
# NetBSD 1.5+ rcorder script lines. The format of the following two
# lines is very strict -- please don't add additional spaces!
#
# PROVIDE: cups
# REQUIRE: DAEMON
#


#### OS-Dependent Configuration

case "`uname`" in
IRIX*)
IS_ON=/sbin/chkconfig

if $IS_ON verbose; then
ECHO=echo
else
ECHO=:
fi
ECHO_OK=:
ECHO_ERROR=:
;;

*BSD*)
IS_ON=:
ECHO=echo
ECHO_OK=:
ECHO_ERROR=:
;;

Darwin*)
. /etc/rc.common

if test "${CUPS:=-YES-}" = "-NO-"; then
exit 0
fi

IS_ON=:
ECHO=ConsoleMessage
ECHO_OK=:
ECHO_ERROR=:
;;

Linux*)
IS_ON=/bin/true
if test -f /etc/init.d/functions; then
. /etc/init.d/functions
ECHO=echo
ECHO_OK="echo_success"
ECHO_ERROR="echo_failure"
else
ECHO=echo
ECHO_OK=:
ECHO_ERROR=:
fi
;;

*)
IS_ON=/bin/true
ECHO=echo
ECHO_OK=:
ECHO_ERROR=:
;;
esac

#### OS-Independent Stuff

#
# Set the timezone, if possible... This allows the
# scheduler and all child processes to know the local
# timezone when reporting dates and times to the user.
# If no timezone information is found, then Greenwich
# Mean Time (GMT) will probably be used.
#

for file in /etc/TIMEZONE /etc/rc.config /etc/sysconfig/clock; do
if test -f $file; then
. $file
fi
done

if test "x$ZONE" != x; then
TZ="$ZONE"
fi

if test "x$TIMEZONE" != x; then
TZ="$TIMEZONE"
fi

if test "x$TZ" != x; then
export TZ
fi

#
# See if the CUPS server (cupsd) is running...
#

case "`uname`" in
HP-UX* | AIX* | SINIX*)
pid=`ps -e | awk '{if (match($4, ".*/cupsd$") || $4 == "cupsd") print $1}'`
;;
IRIX* | SunOS*)
pid=`ps -e | nawk '{if (match($4, ".*/cupsd$") || $4 == "cupsd") print $1}'`
;;
UnixWare*)
pid=`ps -e | awk '{if (match($6, ".*/cupsd$") || $6 == "cupsd") print $1}'`
. /etc/TIMEZONE
;;
OSF1*)
pid=`ps -e | awk '{if (match($5, ".*/cupsd$") || $5 == "cupsd") print $1}'`
;;
Linux* | *BSD* | Darwin*)
pid=`ps ax | awk '{if (match($5, ".*/cupsd$") || $5 == "cupsd") print $1}'`
;;
*)
pid=""
;;
esac

#
# Start or stop the CUPS server based upon the first argument to the script.
#

case $1 in
start | restart | reload)
if $IS_ON cups; then
if test "$pid" != ""; then
kill -HUP $pid
else
prefix=/
exec_prefix=/usr
${exec_prefix}/sbin/cupsd
if test $? != 0; then
$ECHO_FAIL
$ECHO "cups: unable to $1 scheduler."
exit 1
fi
fi
$ECHO_OK
$ECHO "cups: ${1}ed scheduler."
fi
;;

stop)
if test "$pid" != ""; then
kill $pid
$ECHO_OK
$ECHO "cups: stopped scheduler."
fi
;;

status)
if test "$pid" != ""; then
echo "cups: scheduler is running."
else
echo "cups: scheduler is not running."
fi
;;

*)
echo "Usage: cups {reload|restart|start|status|stop}"
exit 1
;;
esac

#
# Exit with no errors.
#

exit 0


#
# End of "$Id: cups.sh.in,v 1.22 2002/12/17 18:56:27 swdev Exp $".
#
##################################end of cups##############


######################output of rc.M in su mode######################

Going multiuser...
Starting sysklogd daemons: /usr/sbin/syslogd /usr/sbin/klogd -c 3 -x
Activating IPv4 packet forwarding.
Starting Internet super-server daemon: /usr/sbin/inetd
Updating shared library links: /sbin/ldconfig
Updating X font indexes: /usr/X11R6/bin/fc-cache
line 78

/dev/hda:
setting 32-bit IO_support flag to 0
setting unmaskirq to 1 (on)
setting using_dma to 1 (on)
setting xfermode to 66 (UltraDMA mode2)
IO_support = 0 (default 16-bit)
unmaskirq = 1 (on)
using_dma = 1 (on)

/dev/hdc:
setting 32-bit IO_support flag to 0
setting unmaskirq to 1 (on)
setting using_dma to 1 (on)
setting xfermode to 66 (UltraDMA mode2)
IO_support = 0 (default 16-bit)
unmaskirq = 1 (on)
using_dma = 1 (on)
firewall and end of local
line 82 ok
cups: started scheduler.


########################### end of output################

signed stumped but not out (cricket joke)
 
Old 04-21-2004, 10:48 AM   #20
mcleprechaun
Member
 
Registered: Oct 2003
Location: Missouri
Distribution: Slackware
Posts: 32

Rep: Reputation: 15
I run Postgresql and I found that copying the contrib start script to rc.d and changing rc.M to run it instead or the MySQL start script also resulted in my rc.local not running. After I commented out the "exit 0" at the end of the rc.pgsql script, things went back to normal. The rc.cups script on my Slackware box has the same "exit 0" at the end of the script and yours probably does too. Comment it out and put everything else back to normal and see what happens.
 
Old 04-21-2004, 03:15 PM   #21
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
I agree, that should probably do it. I'm glad to see that someone has chipped something more on the subject.
This might also be fixed by putting ';' after the call in rc.M
 
Old 04-21-2004, 08:03 PM   #22
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Original Poster
Rep: Reputation: Disabled
mcleprechaun & gnashley

SUCCESS with some grovelling

1) I tried the deletion of rc.cups exit 0 first ran rc.M without luck
2) Added the SEMICOLON ";" to the end of the cups line >>>>>>success
3) added the exit 0 line back to cups fails
4) I don't recall changing this cups file ever, so other slackers may have the same problem. gnashley, you may want to see if that works for your other poster?

For those still following this post,

should I add semicolons to main lines of my other commands?

NO matter what, on boot I have my echos to end of rc.M so thankyou thankyou thankyou.

Thanks for helping me out.
 
Old 04-22-2004, 02:15 AM   #23
portux
Member
 
Registered: Apr 2003
Location: Portugal
Distribution: Slackware 10.1
Posts: 42

Rep: Reputation: 15
Did you tried to write a fi after the cups section?

For me it's very strange that an if doesn' have a fi, but I'm not 100% sure the fi is necessary, only about 99%
 
Old 04-22-2004, 04:21 AM   #24
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Original Poster
Rep: Reputation: Disabled
portux

heres my amended rc.M for your fi question with EXTRA INFO

# Start the print spooling system.
if [ -x /etc/rc.d/rc.cups ]; then
. /etc/rc.d/rc.cups start;
fi
echo line 87

EXTRA INFO
# If there are SystemV init scripts for this runlevel, run them.
if [ -x /etc/rc.d/rc.sysvinit ]; then
. /etc/rc.d/rc.sysvinit
fi
echo line 138 end of M M M

after line 138 I had another fi (for luck) but when I ran it it reported an error.

(2) I found this link that maybe explains the semicolon
http://www.justlinux.com/nhf/Shells/...html#semicolon

I did a posting there but if I am reading your post correct you may not be the best person to ask.

I am trying to find out if I should use the semicolon at the end of all my commands.

But some of mine have two fi commands.

Lets end this thread as its solved my problem. It still leaves the question for other slackers if they have the same error and just don't realise it?

I do not mean to sound in any way that I know what I am talking about as anyone can see I needed your help and others.
 
Old 04-22-2004, 04:35 AM   #25
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Original Poster
Rep: Reputation: Disabled
Heres my attempt to start a new thread on the issue of semicolon and fi

http://www.linuxquestions.org/questi...764#post892764
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
always have to re-run rc.local calcon Slackware 4 04-02-2005 10:32 AM
Run tomcat on a local machine through apache indika Linux - Software 0 01-11-2005 02:48 AM
fedora c2; rc.local didn't run??? GrumpyGnome Linux - Newbie 2 07-03-2004 08:44 PM
rc.local not being run gw1500se Mandriva 6 05-31-2004 02:49 PM
run vnc-server as other user in rc.local jvdbossc Linux - Newbie 2 05-26-2004 02:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:21 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