Page 334 - Hacking Roomba
P. 334

Chapter 14 — Putting Linux on Roomba                315



                                 1 root     S        360     0  0.0  2.5 init
                                62 root     S        344     1  0.0  2.3 syslogd
                               309 root     S        344     1  0.0  2.3 crond
                              2149 root     S        332     1  0.0  2.3 wifi
                                64 root     S        304     1  0.0  2.1 klogd
                               301 root     S        260     1  0.0  1.8 telnetd

                             And you can run other common Linux programs like netstat, ifconfig, and ps. If you’re
                             familiar with Linux, you’ll find most of the low-level administration and inspection tasks
                             available to you. For example, the entire /proc virtual file system exists to give you visibility into
                             the running Linux kernel.
                             Even writing little shell scripts on the command line is possible:
                             root@OpenWrt:~# while [ 1 ] ; do
                             > echo “OpenWrt is the best!”
                             > sleep 1
                             > done
                             OpenWrt is the best!
                             OpenWrt is the best!
                             OpenWrt is the best!

                             The ipkg Packaging System
                             You’ve no doubt noticed the clock is wrong. The easiest way to fix that is to get an NTP client
                             from the ipkg repository. Ipkg is a code packaging and installation technology, a package
                             repository, and a command line program. It takes away a lot of the drudgery of installing new
                             software. Listing 14-1 shows a typical interaction with the ipkg command. If you’re familiar
                             with other network-based packaging systems like ports, yum, or apt-get, using ipkg will be
                             immediately familiar to you.


                               Listing 14-1: Using ipkg to Find and Install ntpclient

                               root@OpenWrt:~# ipkg update
                               Downloading
                               http://downloads.openwrt.org/whiterussian/packages/Packages
                               Updated list of available packages in /usr/lib/ipkg/lists/ i
                               whiterussian
                               Downloading http://downloads.openwrt.org/whiterussian/ i
                               packages/non-free/Packages
                               Updated list of available packages in /usr/lib/ipkg/lists/ i
                               non-free
                               Successfully terminated.
                               root@OpenWrt:~# ipkg list | grep ntp
                               ntpclient - 2003_194-2 - NTP client for setting system time
                               from NTP servers.
                               openntpd - 3.7p1-1 - OpenNTPD is a FREE, easy to use
                               implementation of NTP
                                                                                              Continued
   329   330   331   332   333   334   335   336   337   338   339