- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: after modify /etc/inittab, my daemon never wor...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2007 06:15 PM
08-30-2007 06:15 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2007 06:17 PM
08-30-2007 06:17 PM
Re: after modify /etc/inittab, my daemon never work, unless reboot the machine
i type 'init q', 'init Q' or 'telinit q' anyway, my daemon process cannot start.
my modification as following:
mydm:2345:respawn:/sbin/mydm
but if reboot the machine, then everything is ok. (every times)
why and how can I deal with this problem?
( I want to after modify the /etc/inittab and type 'init q' then my process immediately running. need not reboot)
thanks
--Incle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2007 06:18 PM
08-30-2007 06:18 PM
Solutiondiff changed previous
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2007 06:19 PM
08-30-2007 06:19 PM
Re: after modify /etc/inittab, my daemon never work, unless reboot the machine
echo "Let's begin"
[ -f /home/incle/daemon_other ] && {
while fgrep daemon_other /etc/inittab >/dev/null
do
echo -e "/daemon_other\nd\nw\nq\n" | ed /etc/inittab - >/dev/null
done
echo -e "$\na\ndoor:2345:respawn:/home/incle/daemon_other\n.\nw\nq\n" |
ed /etc/inittab - >/dev/null
/sbin/init q
}
[ -f /home/incle/daemon_loop ] && {
while fgrep daemon_loop /etc/inittab >/dev/null
do
echo -e "/daemon_loop\nd\nw\nq\n" | ed /etc/inittab - >/dev/null
done
echo -e "$\na\ndaem:2345:respawn:/home/incle/daemon_loop\n.\nw\nq\n" |
ed /etc/inittab - >/dev/null
/sbin/init q
}
echo "Good job, bye!"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2007 07:19 PM
08-30-2007 07:19 PM
Re: after modify /etc/inittab, my daemon never work, unless reboot the machine
Yes, actually /sbin/sh.
>in my HP machine the /usr never mounted.
/usr/ is mounted with the rest of the file systems when you go to multiuser mode.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2007 07:22 PM
08-30-2007 07:22 PM
Re: after modify /etc/inittab, my daemon never work, unless reboot the machine
who -r
grep initdefault /etc/iniitab
HTH
Duncan
I am an HPE Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2007 07:36 PM
08-30-2007 07:36 PM
Re: after modify /etc/inittab, my daemon never work, unless reboot the machine
mode.
how to make /usr/ isnt't mounted? changes the runlever?
>> Well what's your current/deafult run-level?
bash-3.2# who -r
. run-level 3 Sep 29 10:25 3 0 S
bash-3.2# grep initdefault /etc/inittab
init:3:initdefault:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2007 07:56 PM
08-30-2007 07:56 PM
Re: after modify /etc/inittab, my daemon never work, unless reboot the machine
The easiest is to boot into single user mode.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2007 07:58 PM
08-30-2007 07:58 PM
Re: after modify /etc/inittab, my daemon never work, unless reboot the machine
cat > /init-test <
while true do
sleep 10
done
EOF
chmod u+x /init-test
echo "test:2345:respawn:/init-test" >> /etc/inittab
init q
ps -ef | grep init-test
Do you see the process running or not?
(This little test works fine on my system)
Don't forget to remove this test line from inittab and 'init q' after running all this.
HTH
Duncan
I am an HPE Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2007 07:59 PM
08-30-2007 07:59 PM
Re: after modify /etc/inittab, my daemon never work, unless reboot the machine
cat > /init-test <
while true
do
sleep 10
done
EOF
chmod u+x /init-test
echo "test:2345:respawn:/init-test" >> /etc/inittab
init q
ps -ef | grep init-test
I am an HPE Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2007 08:03 PM
08-30-2007 08:03 PM
Re: after modify /etc/inittab, my daemon never work, unless reboot the machine
init:3:initdefault:
.
.
.
.
/etc/opt/resmon/persistence/runlevel4_flag"
ems4:0123456:respawn:/etc/opt/resmon/lbin/p_client
----
bash-3.2# ./daemon.sh
+ echo Let's begin
Let's begin
+ [ -f /home/incle/daemon_other ]
+ fgrep daemon_other /etc/inittab
+ 1> /dev/null
+ ed /etc/inittab -
+ echo -e $\na\ndoor:2345:respawn:/home/incle/daemon_other\n.\nw\nq\n
+ 1> /dev/null
+ /sbin/init q
+ [ -f /home/incle/daemon_loop ]
+ fgrep daemon_loop /etc/inittab
+ 1> /dev/null
+ echo -e $\na\ndaem:2345:respawn:/home/incle/daemon_loop\n.\nw\nq\n
+ ed /etc/inittab -
+ 1> /dev/null
+ /sbin/init q
+ echo Good job, bye!
Good job, bye!
bash-3.2#
bash-3.2#
bash-3.2# ps -ef|grep daemon_
root 3015 2919 1 11:07:29 pts/ta 0:00 grep daemon_
root 3009 1 153 11:06:34 ? 0:54 /home/incle/daemon_other
bash-3.2#
bash-3.2# uname -a
HP-UX l1000 B.11.11 U 9000/800 545706547 unlimited-user license
bash-3.2#
bash-3.2#init Q
bash-3.2# ps -ef|grep daemon_
root 3020 2919 2 11:08:37 pts/ta 0:00 grep daemon_
root 3009 1 229 11:06:34 ? 2:02 /home/incle/daemon_other
bash-3.2#
-----
bash-3.2# vi /etc/inittab
init:3:initdefault:
.
.
.
./etc/opt/resmon/persistence/runlevel4_flag"
ems4:0123456:respawn:/etc/opt/resmon/lbin/p_client
door:2345:respawn:/home/incle/daemon_other
daem:2345:respawn:/home/incle/daemon_loop
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2007 08:16 PM
08-30-2007 08:16 PM
Re: after modify /etc/inittab, my daemon never work, unless reboot the machine
bash-3.2# ls -lat init-test
-rwxrw-rw- 1 root sys 39 Sep 29 11:26 init-test
bash-3.2# echo -e "test:2345:respawn:/home/incle/init-test">>/etc/inittab
bash-3.2# init q
bash-3.2# ps -ef|grep init-test
root 3054 1 0 11:27:57 ? 0:00 /sbin/sh /home/incle/init-test
root 3058 2919 1 11:28:08 pts/ta 0:00 grep init-test
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2007 08:20 PM
08-30-2007 08:20 PM
Re: after modify /etc/inittab, my daemon never work, unless reboot the machine
you can see just the first(daemon_other) daemon work, but the second(daemon_loop) never work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2007 08:28 PM
08-30-2007 08:28 PM
Re: after modify /etc/inittab, my daemon never work, unless reboot the machine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2007 02:11 PM
09-03-2007 02:11 PM
Re: after modify /etc/inittab, my daemon never work, unless reboot the machine
and how to deal with it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2007 02:57 PM
09-03-2007 02:57 PM
Re: after modify /etc/inittab, my daemon never work, unless reboot the machine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2007 03:21 PM
09-03-2007 03:21 PM