Find the answer to your Linux question:
Results 1 to 2 of 2
Fixed it, see below. I have learned a lot trying to figure this out, but I cannot seem to come to a solution. I am writing my first bash script ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2013
    Posts
    2

    [solved] empty runlevels overide LSB defaults


    Fixed it, see below.

    I have learned a lot trying to figure this out, but I cannot seem to come to a solution. I am writing my first bash script via init.d and updaterc.d in order to boot a python file on startup.

    I am working on a raspberry pi which is based off dibian.

    Code:
    ## BEGIN INIT INFO
    # Provides: superHouse
    # Required-Start: $local_fs
    # Required-Stop: $local_fs
    # Default-Start: 2 3 4 5
    #Default-Stop: 0 1 6
    ### END INIT INFO
    
    #! /bin/sh
    # /etc/init.d/superhouse
    
    case "$1" in
       start)
           sudo python /home/pi/superHouse.py
           echo "Superhouse Started"
       ;;
       stop)
           echo "Power Down"
           exit 1
       ;;
       *)
            echo "Power Down"
            exit 1
       ;;
    esac
    exit 0
    I changed permissions of the file
    Code:
    sudo chmod 755 superhouse
    ran updaterc.d
    Code:
    sudo updaterc.d superhouse defaults
    I had a bunch of errors that I got rid of by removing all of the spaces and indentation in the script (Why?)

    The only error that I have left is :
    Code:
    insserv: warning: current start runlevel(s) (empty) of script 'superhouse' overrides LSB defaults (2 3 4 5).
    Upon doing some poking around, I found that there are no start up scripts in any of the rcx.d folders. There are some kill files though. That being said, the "Power Down" message is shown on reboot and shutdown. But the "Superhouse Started" is not printed on startup, nor is the script, superhouse.py, executed.

    Thanks in advance for your help
    Last edited by saniel; 02-23-2013 at 03:59 PM. Reason: SOLVED

  2. #2
    Just Joined!
    Join Date
    Feb 2013
    Posts
    2
    Code:
    updaterc.d -f superhouse remove
    
    updaterc.d superhouse defaults

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •