DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2007-07-24 09:36:19

cwilson
Member
Registered: 2007-07-16
Posts: 19

ntpclient for gentoo hdd_boot or chroot

Assuming you can boot or chroot into gentoo (see chroot_gentoo and hdd_boot wiki pages), the attached ebuild installs the stripped-down ntpclient from http://doolittle.icarus.com/ntpclient/ , along with a init and configuraiton data (/etc/init.d/ntpclient, /etc/conf.d/ntpclient)

To install, unpack the attached tarball into /usr/portage/, and from a gentoo boot, or gentoo chroot:

# echo 'EST5EDT' > /etc/TZ
# mkdir -p /etc/portage/package.keywords
# echo 'net-misc/ntpclient        ~*' >> /etc/portage/package.keywords/ntpclient
# emerge net-misc/ntpclient
# /etc/conf.d/ntpclient
# rc-update add ntpclient default
# /etc/init.d/ntpclient start

This ebuild is based on the one here: http://bugs.gentoo.org/show_bug.cgi?id=173377 , but is heavily modified.

Offline

 

#2 2007-07-24 09:50:00

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: ntpclient for gentoo hdd_boot or chroot

Yeah, its good alternative to ntp package's ntp-client which is already in portage but takes more time to compile and possibly more resource to run.


DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#3 2007-07-26 07:53:25

cwilson
Member
Registered: 2007-07-16
Posts: 19

Re: ntpclient for gentoo hdd_boot or chroot

sala wrote:

Yeah, its good alternative to ntp package's ntp-client which is already in portage but takes more time to compile and possibly more resource to run.

Well, that, and for an embedded device I didn't really want to run a time server.  The normal behavior of ntp -- if you run it in daemon mode, and don't just ''ntpdate" once during system startup -- is to participate in a cooperative multihosted client-server network, where all nodes act as both clients and servers.

ntpclient is selfish (and specifically designed for embedded systems).  Now, that's bad karma if you hammer pool.ntp.org as your server -- but if you have a "real" machine on your local network running the "real" ntp client/server (for instance, a hacked wrt54lgs <g>), then it makes sense to have your little dsmg600 just use that local machine, and just be selfish.

I'm just coming up to speed on gentoo, so one of the instructions above was wrong (well, not wrong -- just inadvisable).  Instead of unpacking the tarball into /usr/portage, you should go ahead and set up an overlay:

echo 'PORTDIR_OVERLAY=/usr/local/portage' >> /etc/make.conf
mkdir /usr/local/portage
cd /usr/local/portage
<and unpack here>

The rest of the instructions are unchanged; emerge is smart enough to use the overlay area in addition to the regular area.  ebuilds with newer version numbers always win; tie goes to the overlay area.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB