|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
Issues with rc.local file (and getting CUPS to start at boot time)
Hi all,
1st post so go easy! I've been putting together an OpenBSD 5.4 virtual, on Virtual box, with Ubuntu 12.04LTS as host OS. It's up and running, and CUPS is installed and can be started manually, but I can't seem to get the rc.local file organised, so that CUPS starts on boot. Whatever I try, I cop a syntax error suggesting an un-closed quote at line (x). Current rc.local is as below: Code:
# $OpenBSD: rc.local,v 1.44 2011/04/22 06:08:14 ajacoutot Exp $ # Site-specific startup actions, daemons, and other things which # can be done AFTER your system goes into securemode. For actions # which should be done BEFORE your system has gone into securemode # please see /etc/rc.securelevel. echo -n 'Staring local Daemons:' #Add local startup actions here. #if [ -x /usr/local/bin/dbus-daemon ]; then # mkdir -p /var/run/dbus # chmod 0755 /var/run/dbus # chown -R messagebus:messagebus /var/run/dbus --system # /usr/local/bin/dbus-daemon #fi if [ -x /usr/local/libexec/smbd ]; then echo -n ' smbd' /usr/local/libexec/smbd fi if [ -x /usr/local/libexec/nmbd ]; then echo -n ' nmbd' /usr/local/libexec/nmbd fi if [ -x /usr/local/sbin/cupsd ]; then echo -n ' cupsd'; /usr/local/sbin/cupsd fi #if [ -x /usr/local/sbin/snmpd ]; then # echo -n ' snmpd'; /usr/local/sbin/snmpd #fi kdm_flags="" if [ "X${kdm_flags} != X"NO" ] then /usr/local/bi/kdm ${kdm_flags} ; echo -n 'kdm ' fi echo '.' Last edited by ocicat; 12th January 2014 at 04:09 AM. Reason: Please use [code] & [/code] tags when posting file contents. |
|
|||
Quote:
Per Section 4.14 of the FAQ, the contents of /etc/rc.conf should not be modified. Customizations should go into /etc/rc.conf.local. Following this practice will also make updating simpler as the upgrade process will replace /etc/rc.conf, but leave /etc/rc.conf.local unaltered. Further information can be found in the rc.conf(8) manpage. |
|
||||
Hello, and welcome!
Whatever guide you have been following that sent you to rc.local is at least three years out-of-date. Starting with OpenBSD 4.9, the OS deployed an rc.d infrastructure and all built-in and third party (ports/packages) daemons use it. You can look through the complete list of rc.d scripts, both built-in and installed through packages (dbus, cups, and the like) as they are all located in the /etc/rc.d directory. You turn them on and off by setting variables in your /etc/rc.conf.local file. Built-in daemons are enabled by setting their individual <daemon>_flag variables, and third party daemons are added to a space separated pkg_scripts variable. To start both dbus and cups, you might have this line within rc.conf.local: Code:
pkg_scripts="dbus_daemon cupsd" The rc.conf infrastructure is also briefly described in the Email to the new root account that is part of the standard installation. |
|
|||
Thanks for the replies; have amended the rc.conf.local file to load the cups daemon. Tries to load at start up, but still gives me the "unclosed quotes" error...reading the above post, I can now see why. Will amend the rc.local file later and see if that helps. Thanks again for your help!
|
|
||||
Quote:
|
|
|||
Quote:
|
|
||||
It's not clear if you are still using rc.local for starting daemons, including kdm. If so, this is no longer a best practice.The pkg_script variable is used not only for start up, but for orderly shutdown, and the individual scripts may be used by the admin to stop or restart daemons manually.
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Start only connected Nic at boot | tolstoi | NetBSD General | 4 | 19th January 2012 01:49 AM |
Cannot start program in rc.local | guitarscn | OpenBSD General | 2 | 8th November 2010 01:10 PM |
Weird time issues | schrodinger | OpenBSD General | 7 | 26th October 2009 03:20 PM |
firefox/thunderbird take very long time (~45s) to start | caesius | FreeBSD Ports and Packages | 4 | 28th November 2008 12:04 AM |
ATH not loaded during boot time?? | disappearedng | FreeBSD General | 4 | 14th July 2008 06:57 AM |