Powered by NetBSD

Showing posts with label reconfigure. Show all posts
Showing posts with label reconfigure. Show all posts

Monday, 10 September 2012

Updating the time via NTP

Keeping the time and date up-to-date on a system is quite crucial. To update the time via a NTP Server on NetBSD 5.2.1. MacPPC follow the following steps. 

Edit the file /etc/rc.conf and add the following line to it:
ntpdate=YES ntpdate_hosts="pool.ntp.org"

This will set the time sever to "pool.ntp.org". Next exit vi using :wq!
Nest create a symlink to your local time zone by typing the following command. This example will set the time for Eastern Time in Canada.
ln -fs /usr/share/zoneinfo/Canada/Eastern /etc/localtime
Next restart the NTP service by typing in the following command.
sh /etc/rc.d/rtclocaltime restart
This will cause the system to update the time when the system is connected to the internet. If you want to manually update the time type in the following command and it will update the time.
/usr/sbin/ntpdate -s -b pool.ntp.org
Now type in the date command to see if it has updated the system.

Virtual Console on NetBSD MacPPC

One of the most amazing features, atleast in my humble opinion, about Unix based systems is their ability to support virtual consoles. Now to enable this on a NetBSD system running NetBSD 5.2.1, since it is not enabled by default, follow the following steps.

First enable wscons. To do this open the file /etc/rc.conf using vi Editor by typing in the following command
vi /etc/rc.conf
Navigate to the bottom of the file and insert the following line
wscons=YES
Hit ESC and type in :w! and hit Enter/Return. Hit ESC again and type in :wq!
Now type in the following at the command prompt and hit enter
sh /etc/rc.d/wscons start
Next type in the following command
sh /etc/rc.d/ttys restart
Not to navigate between Virtual Consoles hot COMMAND + Fx replace x with number of console e.g. COMMAND + F2 to goto second virtual console.