rc.local on OpenSuse

Every day solutions to every day challenges. + Brilliant stuff

Moderators: b1o, jkerr82508

Forum rules
Please feel free to post your tip it does not have to be advanced. Also ask questions directly related to the tip here. But do not start new threads with questions or ask for help here. That is what the help section is for. forum rules: http://bjoernvold.com/forum/viewtopic.php?f=8&t=568
User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

rc.local on OpenSuse

Postby viking60 » 12 Oct 2012, 09:41

OpenSuse does not have redhats rc.local so it is a PIA to get things running after the system is initialized.
But you can make your own rclocal (without the dot).

Code: Select all

#! /bin/sh
## This script simulates redhat's rc.local (Add commands at the end)
### BEGIN INIT INFO
# Provides: rclocal
# Required-Start: $local_fs $remote_fs $network
# X-UnitedLinux-Should-Start: $ALL
# Required-Stop:
# X-UnitedLinux-Should-Stop:
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: Simulates rc.local
# Description: Simulates redhat's rc.local: contains
# commands to execute after system has booted (all services are already
# available)
### END INIT INFO
## Execute ony when service is started
case "$1" in
start)
## commands will be executed
;;
*)
exit 0
;;
esac


#  Add your commands bellow this line

Put it in /etc/rc.d/ and every time you need to autostart something you can edit /etc/rc.d/rclocal and put your commands at the bottom.
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
rolf
Guru-Berserk
Posts: 1107
Joined: 16 Mar 2010, 16:07

Re: rc.local on OpenSuse

Postby rolf » 12 Oct 2012, 15:05

Good stuff! :s Suse was on my short list in 2000 then I went with Mandrake. Who knows what tomorrow may bring? :confused


Return to “Tips & Tricks”