Changes between Version 9 and Version 10 of HowTo/WriteInstallScript


Ignore:
Timestamp:
09/25/12 13:13:19 (12 years ago)
Author:
nriga@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HowTo/WriteInstallScript

    v9 v10  
    88The first step is to write your install script. While writing your script you should keep in mind that:
    99   * your script '''does not run in the context of your user''', this means that if you decide to place things in your home directory you will have to make sure that you change the permissions so that you will have access to them when you login
    10    * your script '''does run as a user with [http://en.wikipedia.org/wiki/Sudo `sudo` privileges]''', you can do anything that you can do in the context of your user. Make sure you use `sudo` when:
     10   * your script '''does run as a user with [http://en.wikipedia.org/wiki/Sudo sudo privileges]''', you can do anything that you can do in the context of your user. Make sure you use `sudo` when:
    1111      * you execute privileged commands (e.g. `yum`, `apt-get`, `service`)
    1212      * you place things in your home directory
    1313      * you try to write files in protected directories (e.g. `/usr/locac/bin/, /local/)
    14    * the [http://en.wikipedia.org/wiki/PATH_(variable) `$PATH` environment variable] is not necessarily set, make sure you use the full path of commands in your scripts; for example don't use `ifconfig`, but use `/sbin/ifconfig`. This is also true for the interpreters used for your script.Make sure you add
     14   * the [http://en.wikipedia.org/wiki/PATH_(variable) $PATH environment variable] is not necessarily set, make sure you use the full path of commands in your scripts; for example don't use `ifconfig`, but use `/sbin/ifconfig`. This is also true for the interpreters used for your script.Make sure you add
    1515   * your script runs '''every time the host reboots''', so if you reboot the host as part of your script you have to '''check if your script has already ran''' or you will end up in a cycle of reboots.
    1616