Keyboard

Oscar Veloz oveloz at glasfloss.com
Mon Sep 18 21:10:48 UTC 2006


Below is a copy of what I found in a file called rc.local which is
located at /etc/init.d/.  What I want to do is create a folder at
startup and run chown on it.

Basically if I were at terminal I would do  -

sudo mkdir \var\run\MailScanner

chown postfix.postfix \var\run\MailScanner


how and where would I add to the following?







#! /bin/sh

PATH=/sbin:/bin:/usr/sbin:/usr/bin
[ -f /etc/default/rcS ] && . /etc/default/rcS
. /lib/lsb/init-functions

do_start() {
        if [ -x /etc/rc.local ]; then
                log_begin_msg "Running local boot scripts
(/etc/rc.local)"
                /etc/rc.local
                log_end_msg $?
        fi
}

case "$1" in
    start)
        do_start
        ;;
    restart|reload|force-reload)
        echo "Error: argument '$1' not supported" >&2
        exit 3
        ;;
    stop)
        ;;
    *)
        echo "Usage: $0 start|stop" >&2
        exit 3
        ;;
esac




More information about the ubuntu-users mailing list