{"id":30,"date":"2008-02-06T19:01:52","date_gmt":"2008-02-06T19:01:52","guid":{"rendered":"http:\/\/clayb.net\/blog\/?p=30"},"modified":"2012-05-04T19:41:55","modified_gmt":"2012-05-04T19:41:55","slug":"removing-admintool-and-replacing-whats-left-with-a-very-small-shell-script","status":"publish","type":"post","link":"https:\/\/clayb.net\/blog\/removing-admintool-and-replacing-whats-left-with-a-very-small-shell-script\/","title":{"rendered":"Removing AdminTool and replacing what&#8217;s left with a very small shell script"},"content":{"rendered":"<p>For a few years, Solaris sported a nifty user command called <tt>admintool<\/tt>(1M). This used to be my friend when I started doing system administration around 1997 on Solaris 2.5.1, but slowly the tack at Sun changed and <tt>admintool<\/tt>(1M) was replaced with <tt>solstice<\/tt>(1M), it was more extensible but low and behold that was soon replaced with the current Solaris Management Console (<tt>smc<\/tt>(1M)), however, <tt>solstice<\/tt> too used the backing <tt>admintool<\/tt> libraries.<\/p>\n<p>This certainly makes sense from software engineering principles, as who wants to rewrite code you don&#8217;t have to? However, there was a small command many systems administrators know and love for its patching knowledge caught up in these libraries too. This command was <tt>showrev<\/tt>(1M). This little command is all that&#8217;s left of the once very large and mighty <tt>admintool<\/tt> libraries. Though it&#8217;s certainly time for the libraries, and all last vestiges of <tt>solstice<\/tt> to leave the code base, but <tt>showrev<\/tt>(1M) should stick around a bit longer.<\/p>\n<p>Certainly the days of <tt>showrev<\/tt>(1M) should be numbered.<!--more-->All of its tasks are either obsolete, very weird, or  better performed by other commands. So what&#8217;s a systems administrator, now developer left to do? Especially who&#8217;s tasked with getting rid of it&#8217;s backing libraries? Replace it with a very small shell script of course! This has been the source of a joke going around the Install Group here in Broomfield, thanks to this ThinkGeek <a href=\"http:\/\/www.thinkgeek.com\/tshirts\/frustrations\/374d\/\">shirt<\/a>.<\/p>\n<p><b>So what&#8217;s the line count difference?<\/b><br \/>\nThe old <tt>showrev<\/tt>(1M) was implemented in two files linked against the <tt>admintool<\/tt> libraries. Here are the sizes compared thanks to <tt>wc -l<\/tt>:<br \/>\n<center><\/p>\n<table border=0>\n<tr>\n<th colspan=2>Old:<\/th>\n<\/tr>\n<tr>\n<td align=right>1,631<\/td>\n<td>showrev.c<\/td>\n<\/tr>\n<tr>\n<td align=right>29<\/td>\n<td>showrev.h<\/td>\n<\/tr>\n<tr>\n<td align=right>6,694<\/td>\n<td>libadmagt<\/td>\n<\/tr>\n<tr>\n<td align=right>5,139<\/td>\n<td>libadmsec<\/td>\n<\/tr>\n<tr>\n<td align=right>16,507<\/td>\n<td>libadmapm<\/td>\n<\/tr>\n<tr>\n<td align=right>1,746<\/td>\n<td>libadmapp<\/td>\n<\/tr>\n<tr>\n<td align=right><b><u>31,746<\/u><\/b><\/td>\n<td><b><u>total<\/u><\/b><\/td>\n<\/tr>\n<tr>\n<th colspan=2>New:<\/th>\n<\/tr>\n<tr>\n<td align=right>260<\/td>\n<td>showrev.ksh<\/td>\n<\/tr>\n<tr>\n<td align=right><b><u>260<\/u><\/b><\/td>\n<td><b><u>total<\/u><\/b><\/td>\n<\/tr>\n<\/table>\n<p><\/center><\/p>\n<p>Many goofy things exist in the old version of <tt>showrev<\/tt>(1M). The command dates from before 1991, as it was a command which was transitioned from the SunOS 4 days to Solaris; there&#8217;s even an ARC case from 1991 talking about moving it out of <tt>\/usr\/kvm<\/tt>, and another from 1995 talking about getting rid of it! Still, it does a few, now, very likely, little used things such as parsing a command&#8217;s ELF headers for comments (just with the use of <tt>lseek<\/tt>(2) and lib ELF), and showing a system&#8217;s OpenWindows version. However, now in this day and age of Solaris, all these, even rather odd features, can be implemented with various commands already available on the system.<\/p>\n<p>Sadly, this begs the question, how long should this long lived command continue to live?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Once the mighty end-all of patch checking, a very useful command showing ELF information, and a convenient way of getting a system&#8217;s OpenWindows version, now just a small shell script: <tt>showrev<\/tt>(1M).<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/clayb.net\/blog\/wp-json\/wp\/v2\/posts\/30"}],"collection":[{"href":"https:\/\/clayb.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/clayb.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/clayb.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/clayb.net\/blog\/wp-json\/wp\/v2\/comments?post=30"}],"version-history":[{"count":0,"href":"https:\/\/clayb.net\/blog\/wp-json\/wp\/v2\/posts\/30\/revisions"}],"wp:attachment":[{"href":"https:\/\/clayb.net\/blog\/wp-json\/wp\/v2\/media?parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/clayb.net\/blog\/wp-json\/wp\/v2\/categories?post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/clayb.net\/blog\/wp-json\/wp\/v2\/tags?post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}