LinuxQuestions.org
Visit Jeremy's Blog.
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-17-2008, 02:15 AM   #16
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,225

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021

given that the /etc/rc.local process needs to terminate...

nohup <yourcommand> &
 
Old 03-17-2008, 04:58 PM   #17
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Original Poster
Rep: Reputation: 45
Quote:
Originally Posted by chrism01 View Post
given that the /etc/rc.local process needs to terminate...

nohup <yourcommand> &
The below did not work

Code:
[root:~#] cat /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
nohup /usr/bin/hellanzb.py -D &
 
Old 03-17-2008, 06:26 PM   #18
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Have you tried something more like

Code:
python /usr/bin/hellanzb.py -D -c /etc/hellanzb.conf

Note the explicit specification of python and clarification of config
 
Old 03-19-2008, 06:39 PM   #19
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Original Poster
Rep: Reputation: 45
billymayday - that didn't work. i suspect there must be something about the nature of hellanzb.
 
Old 03-20-2008, 01:42 AM   #20
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,225

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
When I said <yourcmd> that means everything it needs to run, inc full paths to prog and cfg file etc. Just like cron ....
 
Old 03-20-2008, 07:49 PM   #21
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Original Poster
Rep: Reputation: 45
Code:
[root:~#] cat /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
/sbin/modprobe snd-ca0106
touch /var/lock/subsys/local
python /usr/bin/hellanzb.py -D -c /usr/etc/hellanzb.conf
that's what didn't work
 
Old 03-20-2008, 08:16 PM   #22
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Do you get any kind of message during the startup process, entries in logs?
 
Old 03-21-2008, 05:33 AM   #23
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Original Poster
Rep: Reputation: 45
I can see just as the boot process finishes that there is some sort of message but it almost immediately starts loading the DM. Maybe if I booted up in init 3 I would be able to see it? Or does the screen clear and the login prompt then appears?

I've also looked in these two logs and nothing

Code:
[root:~#] cat /var/log/boot.log
[root:~#] cat /var/log/messages | grep hella
 
Old 03-21-2008, 07:44 AM   #24
tredegar
Guru
 
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 6,007

Rep: Reputation: 366Reputation: 366Reputation: 366Reputation: 366
When you start /usr/bin/hellanzb.py from the command line (and presumably it works OK from the command line), which user are you running as? If it is yourself, then that is the problem, as commands in rc.local are run as the root user. Please try suing to yourself, then running the command, with a line like this at the end of rc.local

Code:
su - yourusername -c "cd /home/yourusername/ && /usr/bin/hellanzb.py" &
This is how I start a vncserver for my username when one of my boxes boots. It works nicely
 
Old 03-21-2008, 11:19 AM   #25
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,147

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
Try adding a sleep 10 as the script's last command to "pause" the output long enough for you to read the messages (if any).
 
Old 03-21-2008, 02:42 PM   #26
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Original Poster
Rep: Reputation: 45
doesn't matter whether i run it as root or a normal user. If the command is successfully run, it is in a daemonised state and thus a ps aux should pick it up as running.

will try the sleep 10 command.
 
Old 03-21-2008, 03:09 PM   #27
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,147

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
The "10" in the sleep 10 is the number of seconds to "sleep," so you can increase it as needed.

From man sleep:
Code:
SLEEP(1)                         User Commands                        SLEEP(1)

NAME
       sleep - delay for a specified amount of time

SYNOPSIS
       sleep NUMBER[SUFFIX]...
       sleep OPTION

DESCRIPTION
       Pause  for  NUMBER seconds.  SUFFIX may be s for seconds (the default), m for
       minutes, h for hours or d for days.  Unlike most implementations that require
       NUMBER  be  an  integer,  here  NUMBER may be an arbitrary floating point number.
       Given two or more arguments, pause for the amount of time specified by the sum of
       their values.
 
Old 03-21-2008, 03:28 PM   #28
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Original Poster
Rep: Reputation: 45
Yeah I kinda guessed that's what it does.And that has shed the first serious bit of light on the problem.

The following error is what presents itself

Code:
Please install notify-python or disable Hellanzb.LIBNOTIFY_NOTIFY.
I am suspecting that hellanzb is trying to run in init 3 where notify-python is not loaded. I am guessing this as when I am in a desktop manager, There is no problems with running it.

Code:
[root:~#] yum list | grep notify
libnotify.x86_64                         0.4.4-8.fc8            installed
libnotify.i386                           0.4.4-8.fc8            installed
notify-python.x86_64                     0.1.1-2.fc8            installed
python-inotify.x86_64                    0.7.1-1.fc8            installed
inotify-tools.i386                       3.13-1.fc8             updates
inotify-tools.x86_64                     3.13-1.fc8             updates
inotify-tools-devel.x86_64               3.13-1.fc8             updates
inotify-tools-devel.i386                 3.13-1.fc8             updates
kadu-exec_notify.x86_64                  0.5.0-4.fc8            fedora
kadu-led_notify.x86_64                   0.5.0-4.fc8            fedora
kadu-osdhints_notify.x86_64              0.5.0-4.fc8            fedora
libnotify-devel.x86_64                   0.4.4-8.fc8            fedora
libnotify-devel.i386                     0.4.4-8.fc8            fedora
pidgin-knotify.x86_64                    0.1-5.fc8              fedora
pidgin-libnotify.x86_64                  0.13-2.fc8             fedora
python-inotify-examples.x86_64           0.7.1-1.fc8            fedora
EDIT: My suspicion above was confirmed by running hellanzb.py -D in init 5 and 3 once the system had booted. And sure enough the same error pops up in init 3.

Last edited by Jongi; 03-21-2008 at 03:31 PM.
 
Old 03-23-2008, 05:18 PM   #29
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Original Poster
Rep: Reputation: 45
The key of course was then to run the file not through a console script but through a x script. Enter

Code:
[root:~#] cat /etc/X11/xinit/xinitrc.d/helladaemon.sh
#!/bin/sh
/usr/bin/hellanzb.py -D
which then on boot produces

Code:
[root:~#] ps aux | grep hella
jongi     2469  0.0  1.8 300552 19256 ?        S    00:14   0:00 /usr/bin/python /usr/bin/hellanzb.py -D
So now all is order. Thanks for everyone's help.

Last edited by Jongi; 03-23-2008 at 05:22 PM.
 
Old 03-23-2008, 09:16 PM   #30
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,245
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
i should have known.. your /usr/bin/hellanzb.py is X dependent right?
 
  


Reply

Tags
boot, daemon, hellanzb, startup


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
how can i add a local Folder on local Hard Disk as Yum Repository ?? vahid_p Fedora 4 02-22-2007 10:43 AM
Roaming Profile Local Settings Folder missing Pinkks Linux - Networking 6 02-13-2007 02:33 PM
Setup local machine to allow lan machines to retrieve its local user mail. Brian1 Linux - Networking 3 03-30-2006 05:04 AM
Local webserver -- How to deny all client install their local web server--Please help b:z Linux - Networking 13 04-16-2005 07:11 PM
MySQL command prompt (/usr/local/mysql missing) sankar555 Linux - Software 3 03-22-2003 12:48 PM


All times are GMT -5. The time now is 12:06 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration