IMPORTANT NOTICE

During the next period of time, the Thecus Wiki will migrate to a new site - the NAS Website. The migration is part of an improvement initiative, which includes giving the site a new look and making it more user friendly.

During the migration information may exist both at the old and new site, however slowly pages should start to be located mainly at the new site. Please see the NAS Website for details.

N5200 Module (before 1.00.06): AUTOSTART

From Thecus Wiki

Jump to: navigation, search

Contents

Facts

Name: AUTOSTART (call start/stop scripts on system bootup/shutdown)

Maintainer(s): Andreas Vogel (omega)

Target: N5200

Latest version: 1.0

Depends on module(s): none

Description

Module version 0.1

This module can start scripts/programs when the system boots up and start scripts on shutdown. There are two directories where the scripts or symlink to scripts should be placed:

  • /raid/data/module/autostart/start.d
  • /raid/data/module/autostart/stop.d

The scripts names in start.d must be in the form 'S' + 2-digit number + arbitrary name, e.g. S03demo. For the stop scripts in stop.d the script names start with the letter 'K', e.g. K03demo. The scripts are called with one parameter: start or stop depending on weather it is called on bottup or shutdown. This enables the use of one script for both tasks. The script must have the execute bit set in its file modes. The scripts are called in lexical increasing order.

This module provides a basic method to start actions after booting the system. More and more other modules need this feature so quite a lot modules start to depend on this module.

Normally, in start.d and stop.d only symbolic links are placed. The scripts itself should be placed in /raid/data/module/autostart and the script names should start with the prefix "rc".

Example:

ls -l /raid/data/module/autostart
    -rwxr-xr-x   1  root  root    470   Jan 7 18:00 rcmodule
ls -l /raid/data/module/autostart/start.d
    lrwxrwxrwx   1  root  root     11   Jan 7 18:00 S01module -> ../rcmodule
ls -l /raid/data/module/autostart/stop.d
    lrwxrwxrwx   1  root  root     11   Jan 7 18:00 K01module -> ../rcmodule

The package installation can be run several times without any problems as it cares if it has been run previously. For all files which are modified there will be an initial backup of that file with the extension .ORIG.

Module version 1.0

To be documented...

News

  • <2007-01-06>: 0.1: initial version
  • <2007-01-09>: 1.0: a lot of changes due to the new module design.

Versions

  • Version 0.1
    • Release date: 2007-01-06
    • Works on firmware: 1.00.04, 1.00.05
    • Does not work on firmware:
    • Download: Thecus_N5200_autostart_0.1.zip
    • Major changes: initial version
  • Version 1.0
    • Release date: 2007-01-09
    • Works on firmware: 1.00.04, 1.00.05
    • Does not work on firmware:
    • Download: Thecus_N5200_autostart_1.0.zip
    • Major changes: complies with the new module design, E-Mail notification for install results
Personal tools
product resources