LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-08-2011, 06:49 PM   #1
jv2112
Member
 
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 719

Rep: Reputation: 106Reputation: 106
Question Run Level Script does not run ?


I am trying to figure how to set start up scripts by run level. I have followed the steps below and it does not run.


added Script in /etc/init.d/dirwite (script works -> tested outside of this)

created soft link to rc3d ( 3 is my run level)

Reboot into run level 3.

and NO DICE

What am I missing ?

Any guidance would be appreciated.

Quote:

joe@Mobile-Tux:~$ ls -l /etc/init.d/dirwrite
-rwxr-x--- 1 root root 60 May 8 19:11 /etc/init.d/dirwrite
Quote:
joe@Mobile-Tux:~$ ls -l /etc/rc3.d/S2*
lrwxrwxrwx 1 root root 22 Apr 28 20:11 /etc/rc3.d/S20acpi-fakekey -> ../init.d/acpi-fakekey
lrwxrwxrwx 1 root root 24 Apr 28 20:12 /etc/rc3.d/S20binfmt-support -> ../init.d/binfmt-support
lrwxrwxrwx 1 root root 22 Apr 28 20:11 /etc/rc3.d/S20boinc-client -> ../init.d/boinc-client
lrwxrwxrwx 1 root root 13 Apr 28 20:11 /etc/rc3.d/S20fam -> ../init.d/fam
lrwxrwxrwx 1 root root 20 Apr 28 20:11 /etc/rc3.d/S20fancontrol -> ../init.d/fancontrol
lrwxrwxrwx 1 root root 17 Apr 28 20:11 /etc/rc3.d/S20rsyslog -> ../init.d/rsyslog
lrwxrwxrwx 1 root root 24 Apr 28 20:11 /etc/rc3.d/S20slashem-common -> ../init.d/slashem-common
lrwxrwxrwx 1 root root 14 Apr 28 20:14 /etc/rc3.d/S20sudo -> ../init.d/sudo
lrwxrwxrwx 1 root root 15 Apr 28 20:11 /etc/rc3.d/S22acpid -> ../init.d/acpid
lrwxrwxrwx 1 root root 22 Apr 28 20:11 /etc/rc3.d/S22acpi-support -> ../init.d/acpi-support
lrwxrwxrwx 1 root root 17 Apr 28 20:11 /etc/rc3.d/S22anacron -> ../init.d/anacron
lrwxrwxrwx 1 root root 14 Apr 28 20:11 /etc/rc3.d/S22apmd -> ../init.d/apmd
lrwxrwxrwx 1 root root 13 Apr 28 20:11 /etc/rc3.d/S22atd -> ../init.d/atd
lrwxrwxrwx 1 root root 14 Apr 28 20:11 /etc/rc3.d/S22cron -> ../init.d/cron
lrwxrwxrwx 1 root root 14 Apr 28 20:11 /etc/rc3.d/S22dbus -> ../init.d/dbus
lrwxrwxrwx 1 root root 15 Apr 28 20:11 /etc/rc3.d/S22exim4 -> ../init.d/exim4
lrwxrwxrwx 1 root root 20 Apr 28 20:11 /etc/rc3.d/S22kerneloops -> ../init.d/kerneloops
lrwxrwxrwx 1 root root 21 Apr 28 20:11 /etc/rc3.d/S22loadcpufreq -> ../init.d/loadcpufreq
lrwxrwxrwx 1 root root 15 Apr 28 20:11 /etc/rc3.d/S22rsync -> ../init.d/rsync
lrwxrwxrwx 1 root root 13 Apr 28 20:11 /etc/rc3.d/S22ssh -> ../init.d/ssh
lrwxrwxrwx 1 root root 20 Apr 28 20:11 /etc/rc3.d/S23alsa-utils -> ../init.d/alsa-utils
lrwxrwxrwx 1 root root 22 Apr 28 20:11 /etc/rc3.d/S23avahi-daemon -> ../init.d/avahi-daemon
lrwxrwxrwx 1 root root 19 Apr 28 20:11 /etc/rc3.d/S23bluetooth -> ../init.d/bluetooth
lrwxrwxrwx 1 root root 22 Apr 28 20:11 /etc/rc3.d/S23cpufrequtils -> ../init.d/cpufrequtils
lrwxrwxrwx 1 root root 20 Apr 28 20:11 /etc/rc3.d/S23lm-sensors -> ../init.d/lm-sensors
lrwxrwxrwx 1 root root 25 Apr 28 20:11 /etc/rc3.d/S23network-manager -> ../init.d/network-manager
lrwxrwxrwx 1 root root 14 Apr 28 20:11 /etc/rc3.d/S24cups -> ../init.d/cups
lrwxrwxrwx 1 root root 15 Apr 28 20:11 /etc/rc3.d/S24saned -> ../init.d/saned
lrwxrwxrwx 1 root root 18 Apr 28 20:11 /etc/rc3.d/S25bootlogs -> ../init.d/bootlogs
lrwxrwxrwx 1 root root 18 Apr 28 20:11 /etc/rc3.d/S26rc.local -> ../init.d/rc.local
lrwxrwxrwx 1 root root 19 Apr 28 20:11 /etc/rc3.d/S26rmnologin -> ../init.d/rmnologin
lrwxrwxrwx 1 root root 23 Apr 28 20:11 /etc/rc3.d/S26stop-bootlogd -> ../init.d/stop-bootlogd
lrwxrwxrwx 1 root root 18 Apr 28 20:11 /etc/rc3.d/S26tpdaemon -> ../init.d/tpdaemon
lrwxrwxrwx 1 root root 20 May 8 18:24 /etc/rc3.d/S28dirwrite -> /etc/init.d/dirwrite



Disto --> Debian Testing.
 
Old 05-08-2011, 07:15 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Seems like it should work. Are you sure that you are booting to runlevel 3? Also, have you tried to add something like
Code:
touch /root/test
to the script, so that you can see if it is invoked?
 
Old 05-08-2011, 07:24 PM   #3
jv2112
Member
 
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 719

Original Poster
Rep: Reputation: 106Reputation: 106
Thanks for the reply. Yes it is in run level 3. I checked by the runlevel command to be sure.

The script is similar to what you typed. I was just trying to learn the process.

Script used to test-->

Quote:
#! /bin/bash

ls /home/ -lR >> /home/joe/Current_Directory
Now I am really confused.......


Any other input out there ?

I tried this on two systems (Both Debian Testing) with the same result...
 
Old 05-08-2011, 07:51 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Just to re-iterate this: how did you check you're in init 3?
 
Old 05-08-2011, 08:28 PM   #5
jv2112
Member
 
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 719

Original Poster
Rep: Reputation: 106Reputation: 106
"runlevel" at CLI

also validated at /etc/inittab.

 
  


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
Can't switch to TTY or run level 3 from run level 5 reemfz Fedora 3 06-01-2009 08:06 AM
How to enter graphical mode (run level 5) command line (run lenel 3) edmondgyampoh Linux - Newbie 3 05-15-2009 06:33 PM
need to write a run level 3 script knockout_artist Linux - Newbie 5 11-12-2008 11:45 AM
set your default run level so you will boot to a default run level - vga console Adam555 Linux - Newbie 1 01-21-2008 04:55 PM
/etc/X11/xinit/.Xmodmap; run level 4 won't init script Potatopopper Slackware 5 11-27-2005 07:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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