Vytvoril som adresár /etc/my_startup_scripts a doňho som umiestnil skript, ktory obsahuje príkaz:
#!/bin/bash
#initialize wifi card
rutilt -edp mojprofil
potom som do adresára /etc/rc.d/rc5.d umiestnil odkaz na ten skript. Odkaz sa vola S57rutilt.
Nejako to však nefunguje, čo som urobil zle?
buď ten skript nemá príznak executable alebo nemáš ten program
rutilt
v ceste alebo nastala akákoľvek iná chyba. čo to píše pri štarte?Activating compat-mode for non LSB-Script S89rutilt.
Ked spustim skript "manuálne" po štarte, tak to funguje...
V samotnom skripte by nemal byť problém, kedze mi pri "beznom" spusteni funguje...
#!/bin/sh
#
# Startup script for program
#
# chkconfig: 345 85 15 - This statement tells the chkconfig command how to add or delete this process to the boot process
# description: Description of program
# processname: process-name
# pidfile: /var/run/process-name.pid
# Source function library. This creates the operating environment for the process to be started
. /etc/rc.d/init.d/functions
case "$1" in
start)
echo -n "Starting process-name: "
daemon process-name - Starts only one process of a given name.
echo
touch /var/lock/subsys/process-name
;;
stop)
echo -n "Shutting down process-name: "
killproc process-name
echo
rm -f /var/lock/subsys/process-name
rm -f /var/run/process-name.pid - Only if process generates this file
;;
status)
status process-name
;;
restart)
$0 stop
$0 start
;;
reload)
echo -n "Reloading process-name: "
killproc process-name -HUP
echo
;;
*)
echo "Usage: $0 {start|stop|restart|reload|status}"
exit 1
esac
exit 0
v tvojom pripade asi staci
case "$1" in
start)
rutilt -edp mojprofil
;;
*)
echo "Usage: $0 {start}"
exit 1
esac
exit 0
Vďaka.
/etc/rc.local
?