Announcement

Collapse
No announcement yet.

Configure init script...

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Configure init script...

    I have a RedHat init script that I need to adapt to (K)Ubuntu...

    In order to set an ISCSI timer in my RedHat hosts, I need to do this:

    1. Create file called iscsi-device-timeout at /etc/rc.d/init.d/
    2. Copy/paste or type the short script below. This command should be repeated for all iSCSI devices. Keep in mind, I have used sdb in this example.
    a. echo 120 > /sys/block/sdb/device/timeout
    3. Make file executable
    a. chmod +x iscsi-device-timeout
    4. Create link to boot levels 3 and 5
    a. ln -s /etc/rc.d/init.d/iscsi-device-timeout /etc/rc3.d/S999iscsi-device-timeout
    b. ln -s /etc/rc.d/init.d/iscsi-device-timeout /etc/rc5.d/S999iscsi-device-timeout
    5. Reboot the host and verify the result, cat /sys/block/sdb/device/timeout
    a. Verify the file timeout is 120

    I've never really dug WAY deep into setup up init processes on Kubuntu, but what I need to do is setup a script to do this.

    What would be the Ubuntu equivelant of the RedHat way?

    #2
    You could do it in a similar way in *buntus (although *buntus use upstart, the old style init scripts should work as well), except kubuntu (like debian) defaults to runlevel 2 (rc2.d).

    However, since your script runs relatively late in the boot process (S99), you could just put the command(s) in /etc/rc.local (which is a simpler solution)

    Comment


      #3
      Thanks for that quick insight. Worked great!!

      Comment

      Working...
      X