LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Run Level Script does not run ? (https://www.linuxquestions.org/questions/linux-newbie-8/run-level-script-does-not-run-879533/)

jv2112 05-08-2011 06:49 PM

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 ? :study:

Any guidance would be appreciated. :hattip:

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.

TobiSGD 05-08-2011 07:15 PM

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?

jv2112 05-08-2011 07:24 PM

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.......:confused:


Any other input out there ?

I tried this on two systems (Both Debian Testing) with the same result...:study:

Tinkster 05-08-2011 07:51 PM

Just to re-iterate this: how did you check you're in init 3?

jv2112 05-08-2011 08:28 PM

"runlevel" at CLI

also validated at /etc/inittab.

:study:


All times are GMT -5. The time now is 04:35 PM.