My trusty computer companion of the last five years, Marian, has been replaced by a new hottie, Hillary. Marian, an aging celeron 400Mhz/256M/40G running RedHat 7.3, serviced me well, doing sendmail/fetchmail/web/mysql/perl developement chores. But times change and so must I. Hillary is a Athlon XP 2600 Barton 1.9Ghz/512M/80G RedHat 9.0 system that now runs everything like Marian used to -- BUT FASTER. So, hail Hillary.
A few notes:
LANG=en_US
. Rasberries to RedHat.
apt-get
. Perhaps the fine folks
running debian might consider shipping a 2.4 kernel before the 2.6 comes out.
Woody ships with a 2.2 kernel from 2002.
File: setup_jjohn
#!/usr/bin/env perl # -*-cperl-*- # # start|stop processes that I need # use strict; use warnings; use File::Basename; use Getopt::Std; our $HOME = "/home/jjohn"; our $LASTRUN = "$HOME/etc/.jjohn_setup"; our %PROCS = ( '01 SSH tunnels' => { start => "$HOME/etc/ssh_mail_tunnel start", stop => "$HOME/etc/ssh_mail_tunnel stop", }, '02 MON' => { start => "$HOME/etc/mon/start_mon", stop => "killall mon", }, '99 VNC' => { start => "$HOME/bin/start_vnc", stop => "/usr/bin/vncserver -kill :1", }, '04 Fetchmail' => { start => "/usr/bin/fetchmail", stop => "killall fetchmail", }, '03 Apache'=> { start => "/usr/bin/sudo $HOME/src/apache-current/bin/apachectl start", stop => "/usr/bin/sudo $HOME/src/apache-current/bin/apachectl stop", }, ); my $opts = {}; getopts('h?fv', $opts); $|++; my $action = (lc pop @ARGV) || 'start'; my %dispatch = ( 'stop' => \&stop, 'start' => \&start, 'usage' => \&usage, 'status' => \&status, ); $action = 'usage' if $opts->{'?'} || $opts->{'h'}; if (exists $dispatch{$action}) { $dispatch{$action}->($opts); } else { start($opts); } exit; #--------------------------------------------------------------------- sub start { my ($opts) = @_; # Skip the LASTRUN check if the force flag is set unless ($opts->{f}) { # compare the boot time (/var/lock/subsys/local) to our last runtime if (-e $LASTRUN) { my $sysboot = (stat "/var/lock/subsys/local")[9]; my $lastrun = (stat $LASTRUN)[9]; # if we have run after system boot, bail if ($lastrun > $sysboot) { warn "Already ran since boot. Halting.\n" if $opts->{v}; return; } } } for my $proc (sort keys %PROCS) { printf "Starting %-25s:", $proc if $opts->{v}; my $ok = "OK"; if (system("$PROCS{$proc}->{start} 2>&1 > /dev/null")) { $ok = "FAILED"; } printf "%15s\n", $ok if $opts->{v}; } # print out PID to LASTRUN open my $pid, ">$LASTRUN" or die "can't open '$LASTRUN': $!\n"; select(((select $pid) => $|++)[0]); print $pid $$; close $pid; } # stop the services above sub stop { my ($opts) = @_; for my $proc (reverse sort keys %PROCS) { printf "Stopping %-25s:", $proc if $opts->{v}; my $ok = "OK"; if (system("$PROCS{$proc}->{stop} 2>&1 > /dev/null")) { $ok = "FAILED"; } printf "%15s\n",$ok if $opts->{v}; } unlink $LASTRUN; } sub usage { my $name = basename $0; print "$name - control services for jjohn USAGE: $name [OPTIONS] [ACTION] \$ $name -v start # start services with verbosity \$ $name stop # stop services silently \$ $name status # show boot time vs. last run of this program OPTIONS: h print this screen ? print this screen f force start, regardless of LASTRUN file v turn on verbose messages "; } sub status { my ($opts) = @_; my $lastrun = (stat $LASTRUN)[9]; my $boot = (stat "/var/lock/subsys/local")[9]; my $name = basename $0; my $ltime = (defined $lastrun) ? scalar localtime($lastrun) : "NEVER RUN"; my $btime = scalar localtime($boot); printf "%16s: %-20s\n%16s: %-20s\n", "system boot", $btime, "$name ran", $ltime; }
Re:newegg
hatepocket on 2005-03-29T06:40:12
I think www.meritline.com is also excellent on media,memory,ink and cases. Meritline is the best place for me to buy DVD media. They have the lowest prices by far. They need to offer free 2nd day like others or atleast free ground shipping. I love Meritline. I bought 150 Verbatim DVD R disks for an average of 23 cents a piece. I challenge anyone to beat that from any other store. Meritline is the best place to buy stuff for all your recording and labeling needs. They even sell ink for cheap. I have ordered six HP 78 color cartridges for less than $10 dollars each. Like I said before they are the most affordable option out there. I would really love it if they offered free ground shipping. That would get them a perfect 5 out of 5 from me. I would never shop anywhere else for my CD and DVD storage and labeling needs.