Thursday, January 31, 2008

Upgrade problems for sysvinit (2.86.ds1-16 | 2.86.ds1-19)

Update: Post out-of-date …. don’t flame me

Those of you who followed the earlier the fix for sysvinit (2.86.ds1-16) upgrade problem given below should read the follow-up comments that were aired on both debian-devel and debian-user.

— Petter Reinholdtsen Sat, 9 Sep 2006 20:12:47 +0200
In version 2.86.ds1-16 of the sysv-rc package released 2006-09-06, the update-rc.d script was broken. When used to to update symlinks it would remove all symlinks for a init.d script if such symlinks existed, and add them if they were missing. This broke all packages being upgraded after the new version was installed, as their init.d scripts will no longer be executed. This problem was fixed in version 2.86.ds1-18, but the broken packages will stay broken until their postinst scripts are executed again.

Those with packages being broken from this bug can fix it by using ‘apt-get —reinstall install package’ on the affected packages. A quick way out is to reinstall all the packages with scripts in /etc/init.d/.

for p in `dpkg -S /etc/init.d/*|cut -d: -f1|sort -u`; do
apt-get —reinstall install -y $p
done

Read the Petter Reinholdtsen’s post

sysvinit (2.86.ds1-19) unstable; urgency=low

The script proposed below is dangerous, as it had a problem
with removed but not purged packages. If such packages had
files in /etc/init.d/, it could end up trying to remove quite a lot of packages. This version check to make sure the package is installed before trying to reinstall it, as well as making sure the admin is asked for every package.

for p in `dpkg -S /etc/init.d/*|cut -d: -f1|sort -u`; do if dpkg —get-selections $p | grep -qw install ; then echo reinstalling $p apt-get —reinstall install $p fi done

To avoid the question, add -y as an argument for apt-get.
An alternative to reinstalling all these packages is to look in /var/log/dpkg.log for the packages that was installed and upgraded between sysv-rc version 2.86.ds1-16 and version 2.86.ds1-18, and only reinstall these. A script to do this and update the system is provided in /etc/init.d/.

/usr/share/doc/sysv-rc/update-rc.d-recover

Please use it to update your installation if you were upgrading from one of the broken versions of sysv-rc.

RFC Humour: Really Funny Collection

The Requests for Comments (RFCs) are a treasure trove of information on everything related to the Internet. Internet Engineering Task Force (IETF) , an open forum oversees the development and standardization of the technical aspects of the Internet.Any new technical ideas are first issued as Drafts, after much discussion, arguments and IETF meetings these are released as RFCs.

The purpose of the RFCs is not only standardization, but they often document and provide an in-depth analysis of common workings of existing technologies.Though RFCs aren’t meant to be handy guides for learning for lay computer users,but they do offer crisp and authoritative information.

If you think that RFCs are just rambling of technical mambo-jumbo that’s not meant for lowly mortals, think again. Don’t be surprised if you come across Hyper Text Coffee Pot Control Protocol or The Infinite Monkey Protocol Suite and widely known Carrier Pigeon Internet Protocol which was implemented by Bergen Linux User Group using carrier pigeons and it works too!!.

Often released on April 1, those RFCs make a wonderful reading.

  • RFC748 TELNET RANDOMLY-LOSE Option
  • RFC873 The Illusion Of Vendor Support
  • RFC968 `Twas the Night Before Start-up
  • RFC1097 TELNET SUBLIMINAL-MESSAGE Option
  • RFC1149 A Standard for the Transmission of IP Datagrams on Avian Carriers
  • RFC1216 Gigabit Network Economics and Paradigm Shifts
  • RFC1217 Memo from the Consortium for Slow Commotion Research (CSCR)
  • RFC1313 Today’s Programming for KRFC AM 1313 Internet Talk Radio
  • RFC1300 Remembrances of Things Past
  • RFC1437 The Extension of MIME Content-Types to a New Medium
  • RFC1438 Internet Engineering Task Force Statements Of Boredom (SOBs)
  • RFC1605 SONET to sonnet translation
  • RFC1606 A Historical Perspective On The Usage Of IP Version 9
  • RFC1607 A View from the 21st Century
  • RFC1776 The Address is the Message
  • RFC1882 The 12-Days of Technology Before Christmas
  • RFC1924 A Compact Representation of IPv6 Addresses
  • RFC1926 An Experimental Encapsulation of IP Datagrams on Top of ATM
  • RFC1927 Suggested Additional MIME Types for Associating Documents
  • RFC2321 RITA —The Reliable Internetwork Troubleshooting Agent
  • RFC2322 Management of IP numbers by peg-dhcp
  • RFC2323 IETF Identification and Security Guidelines
  • RFC2324 Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)
  • RFC 2325 Definitions of Managed Objects for Drip-Type Heated Beverage Hardware Devices using SMIv2
  • RFC2549 IP over Avian Carriers with Quality of Service
  • RFC2551 The Roman Standards Process — Revision III
  • RFC2795 The Infinite Monkey Protocol Suite
  • RFC3091 Pi Digit Generation Protocol
  • RFC3093 Firewall Enhancement Protocol (FEP)
  • RFC3252 Binary Lexical Octed Ad-hoc Transport
  • RFC3514 The Security Flag in the IPv4 Header
  • RFC3751 Omniscience Protocol Requirements

OI! Move over, The IT Crowd is here

Alright, if you haven’t ever heard of User Friendly stop reading right here.

This is London and in the bowels of Reynholm Industries lie another world. Yes, my dear listeners we are now on the holy ground of the nerds, its the IT department. Its here the social inept, sexually confused step onto the righteous path of enlightenment. (Its however another matter than the light of day never reaches into these dingy basement offices) This is world of The IT Crowd

For my brethren in gnu/Linux world, don’t miss out the show’s opening title sequence animation depicting a gnu/Linux kernel panicking during a Fedora Core 4 installation.(easily mistaken for a Windows blue screen of death, amen!). Hey you need to watch real close to find a lot geek lore on the sets, old hardware, t-shirts you would kill for and a lot more listed here on the Wikipedia page of show

Logging PHPnuke Database Connection Failures

Find the db/db.php file in your PHPnuke installation and insert the error_log line.

if(!$db->db_connect_id) { die(”<br><br><center><img src=images/logo.gif><br><br><b>There seems to be a problem with the $dbtype server, sorry for the inconvenience.<br><br>We should be back shortly.</center></b>”);
}

Now the last lines of the db/db.php file should look like this. The error_log simply logs the errors into /home/foo-joe/logs/db_log, you should change this to reflect your directory structure.

if(!$db->db_connect_id) {
error_log(”[”.date(“D M d Y h:iA”).”] Failed to serve request for page ‘”. $_SERVER[‘REQUEST_URI’].”’ from ‘”.$_SERVER[‘REMOTE_ADDR’].”’ using browser ‘”. $_SERVER[‘HTTP_USER_AGENT’].”’\n”,3,”/home/foo-joe/logs/db_log”); die(”“<br><br><center><img src=images/logo.gif><br><br><b>There seems to be a problem with the $dbtype server, sorry for the inconvenience.<br><br>We should be back shortly.</center></b>”);
}

Refer to error_log PHP manual page for more information and PHPnuke documentation on error logging and database calls, Please note this is for debugging purpose only.

What works in Yahoo! Groups spam control ?

Having a healthy mailing-list without spam is difficult but not impossible. If you have much time on your hands you can set about approving every member and message that shows up on your list. ;)

The mailing-list or a group (as Yahoo! calls it) that I mention in this post is hosted on Yahoo! groups service. The list is set as unmoderated (all messages get posted directly) and has open membership policy (anyone can join and leave the group as they please). For spam control the Yahoo! SpamGuard filters are enabled but the spammers did sneak in.

Since I abhor any kind of message moderation on this list and didn’t want the moderators spend all their time approving membership requests (which were quite a lot), I looked at other strategies for eliminating spam. I observed that most of the spam we received is from newly joined members, so it seemed to be a good idea to moderator the posts of newly joined members only. This create a sort of sandbox where all new members should spend time until one of the moderator manually changes their status to unmoderated.

Here is an extract from the Yahoo! groups help page that explains the settings in detail.

  1. Click Management on the left side of any group page.
  2. Click Messages in the “Group Settings” section.
  3. Click Edit next to “Postings and Archives”.
  4. Select the New Members button in the “Moderation” column.
  5. Click Save Changes. Now go on and moderate!

This setting means that new members to the group will require moderation for all messages they post until you change their setting to either “Use current group message posting setting” or “Messages by this member are not moderated”

One other setting I recommend for moderators to get notified of a pending message via email this way you can attended to the request faster and help weeding out (or banning a member) spammers from the sandbox. This strategy seems to work in controlling most of the spam we get on this list. But it doesn’t prevent any of already existing members from spamming the list.

Please do share your experiences on managing a Yahoo! group mailing-list.!!

Handling CHM files in GNU/Debian Linux

In a perfect world all the OCR files would come in djVu format but world isn’t perfect, so this morning I had read this 300 page CHM compiled HTML Help (insert joke here)file and for no apparent reason my CHM viewer won’t display the file beyond page 50. Bummer!.

Don't get me wrong but there some great programs to handle CHM files on gnu/Linux OS. And I’ll mention some of them here in this post. A more detailed specifications of CHM format. is available if you are interested.

Graphical CHM Viewers

Well, The brief list doesn’t attempt to be complete but it gives you an idea of range of tools available to a gnu/Linux user.

View a CHM file on a Web Browser

If you like to read using your favorite web browsers instead of a Graphical X based CHM viewer, then there is chm_http in libchm-dev package from the CHMLib project . Also Archmage package has http-server and or if you prefer Apache Web Server instead of standalone webservers then there is an extension mod_chm too .

Converting and De-compiling CHM files

Of late I saw chm2pdf project offering to covert CHM files directly into PDF. I should try it sometime, but for now I will just de-compile the CHM file and get done with it.

So, if you don’t have libchm-dev package installed, then do this.

sudo apt-get install libchm-dev

This package has “extract_chmLib” program which will extract and place the files in a given directory.

extract_chmLib Foo.chm Foo-dir/

That it, now you can use your web browser to read the contents at your will. It is a quick and dirty way, but its much better than using the dreaded CHM files anyway.

Compiling CHM files ?

Sometime after this entry was posted, I got people asking me how to create CHM files under gnu/Linux .

According to Bruce Byfield in two year old article on FOSS help authoring tools
Numerous projects for cross-platform or GNU/Linux-based tools for producing .chm files have been announced, but most of them are in the planning stage, and have released little or no code. The only two that seem polished enough to use are AurigaDoc and DocBook two XML-based solutions that are well-known in other contexts.

How to Block Ads With Adzap

Cameron Simpson’s Adzap (http://adzapper.sourceforge.net) is a Perl program written to match and replaces those annoying web ads.It uses the redirector option of Squid proxy-caching server (http://www.squid-cache.org), a fast and efficient caching server.

How does Adzap work?

Squid proxy server is designed to cache web content as clients requests,it checks for presence of local copy of request, if found servers it directly.This not only saves bandwidth usage but accelerates web speed.

Squid redirects requested URL to adzapper program which tries to identify ads,unrequested pop-up widows and other unsolicited content using regular expressions.

Most of content such as graphics,flash animations,client-side scripts and executables are matched and quietly replaced.Adzap returns sanitized request back to squid which servers it.This increases the surfing speeds considerably even if you are on boardband connection.

Most commercial web advertisers track user preferences and surfing habits.Adzap protects your privacy by efficiently blocking such ads from loading.

How do you install Adzap?

You can download the latest version of Adzap from http://adzapper.sourceforge.net .

Uncompress the the Adzap files to your /usr/local/ directory.If you use any other directory,please do change the commands in this article.

tar zxvf adzap-20030726.tar.gz -C /usr/local/

Change your directory to /usr/local/adzap.All the adzap programs are found under the scripts directory.

bq. cd /usr/local/adzap/

Edit the scripts/wrapzap file and set the zapper to squid_redirect.You can customize the Adzap to suit your needs in this file.

zapper=/usr/local/adzap/scripts/squid_redirect

Configure the squid to use Adzap as its redirector program.The squid configuration file in most *nix’s is /etc/squid/squid.conf.Set the redirect_program option as mentioned.

redirect_program /usr/local/adzap/scripts/wrapzap

Restart the squid server.

/etc/init.d/squid restart

Check the /var/log/squid/cache.log for any errors.Start your favorite browser and point it towards your squid server and enjoy ad free surfing.

First Published long time ago on the web.

Popular Posts