
|
Some combinations seem quite improbable. Who could have predicted that Lisa Marie Presley would ever marry Michael Jackson? Or that Pat Boone would release a heavy metal record album? And who would imagine that a mixture of Bohemian dance music, '30s style swing, polka tunes, and country hoedown rhythms, with a touch of Hawaiian influence, could provide the basis for a succesful career? Well, we don't have to imagine it, because a man named Adolph Hofner once conceived of that very thing and executed it so successfully that he has remained popular in South Texas for more than 50 years. Outside of Texas he is best remembered, if at all, primarily as a pioneer of "Western Swing."
Adolph Hofner was born into the Texas Czech-German community and recorded not only hot Western Swing, but also mellow "heart songs" as well as old Czech polkas and waltzes, many actually sung in Czech! Over the years his mellifluous vocals led to a sometimes billing as the "Bing Crosby of Country." But Hofner was so versatile that at one time or another, he has also been called "The Dean of Country Bandleaders," "The Sultan of Swing," "The Prince of Polka," and "The King of South Texas Swing." Who is this man who inspired such an enthusiastic following? Adolph Hofner was born on June 8, 1916, in Moulton, Texas, a small Czech community in Lavaca County between Houston and San Antonio. His mother was Czech, his father German and Czech. Czech was his first language, and polka music the sound of his youth. As a boy he attended Bohemian dance halls and listened to "oom-pah" bands. The Hofner family moved to San Antonio when Adolph was 10 years old. Thereafter he was exposed to many different styles of music, among them the recordings of Hawaiian string groups who, after experiencing a short-lived wave of popularity in the late '20s and early '30s, left the steel guitar as a legacy to country, bluegrass, and rock 'n roll music. As Hofner has said: "That's what got me started on string, Hawaiian guitars." Adolph and his younger brother Emil both learned to play stringed instruments at an early age, starting when they ordered a ukelele from a catalog. When the mailman delivered it: "We like to broke the ukulele before we got it into the house fighting over it." By the early 1930's Adolph and Emil were taking guitar lessons. Adolph learned the guitar, while Emil concentrated on the steel guitar. Hofner listened avidly to such artists as Jimmie Rodgers, Bing Crosby, and Russ Columbo -- even Rudy Vallee. Then he heard Milton Brown and his Brownies. "Now that's what sold me on western music -- because they had a band." The Hofner brothers played in San Antonio clubs when and where they could. Adolph can remember playing at an outdoor dance for the princely sum of 50 cents. Eventually, the brothers teamed up with a fellow named Simon Garcia, forming a trio they called "The Hawaiian Serenaders." It was with Simon Garcia that Adolph learned "Maria Elena," later to become a big recording hit for him. After a time the group landed a 15-minute Sunday radio spot on KTSA. The boys were only half way into the program when the radio station cut them off the air. Adolph was so disgusted that he almost gave up the music business. Elsewhere in San Antonio, a man named Jimmie Revard had been fronting a little combo and was looking to put together a professional group. Revard heard the Hofner brothers at the Monte Carlo Inn and was taken by Emil and his steel guitar work. The boys were still teenagers, so Revard hired Adolph as well, being afraid that the younger brother wouldn't come along otherwise. The group took the name "Oklahoma Playboys" to distinguish themselves from Bob Wills and His Texas Playboys.
The Hofners first recorded with Jimmie Revard and his Oklahoma Cowboys at the Texas Hotel in San Antonio on October 22, 1936. That's Adolph in the little color picture with his guitar in the center of the Jimmie Revard group. Brother Emil is shown seated with the guitar across his lap. Jimmie Revard is second from the left. [Can't make them out? Well, take a look at the larger version.] At one time the "Oklahoma Cowboys" actually relocated to Oklahoma, but the Hofners ultimately left the group (and the harsh Oklahoma winters) to return to San Antonio. Again Adolph considered giving up music. He accepted a position as a mechanic in San Antonio, but this job lasted only three weeks. He didn't much care for the work and missed playing his music. In the late '30s Hofner went to work for Tom Dickey and The Showboys, with whom he recorded "It Makes No Difference Now," a tune, with Adolph's vocal, that led to a rise in his popularity. The Showboys had a little radio spot and Hofner was fired from the group for being late to the studio one day. Thereafter, forming his own group and being his own boss seemed like the thing to do. By 1938 "Adolph Hofner and All the Boys" were performing around San Antonio and other parts of South Texas. The "Boys" entered the recording studio on October 25, 1938, under the name "Texans" so that the record-buying public would know where they were from. When it turned out that someone had a copyright on that name, the group changed its name to "Adolph Hofner and the San Antonians." A recording session on February 13, 1940 produced Hofner's recording of "Maria Elena," a big enough hit to insure a successful career. In 1941 another session produced "Cotton-Eyed Joe," Hofner's version of which was something of a national hit. Indeed, he may have been the first ever to record this tune. As with many other groups, the personnel changed over the years. The group (shown below) that recorded at least 7 numbers at the February 13, 1940, session included: ![]()
The six "boys" from left to right are: Ferguson, Seago, Reeves, Emil, Wheeler, and Adolph.
The exceptional fiddler J.R. Chatwell also passed through the group, participating in a number of sessions. He is seen in this photo taken in the late '40s or early '50s at Radio Station KENS. Click on the image for a personnel list and a better look at those snappy ties. Hofner remained regionally popular throughout the 1940s and 50s. During World War II the similarity of his name to Adolph Hitler caused the sort of discomfort that can easily be imagined. But performing as "Dolph" Hofner & the San Antonians he enjoyed a few good years playing for Foreman Phillips out in California. ![]() In the 1950s the band came under the sponsorship of the Pearl Beer company and the "Boys"/"Texans"/"San Antonians" became the "Pearl Wranglers." The picture at left shows Hofner leading the group from inside a Pearl Beer parade float as it motors past a tattoo parlor. Over the years Adolph and his boys recorded for many labels, including Imperial, Columbia, RCA, Decca, and Sarg. The repertoire included not only Western Swing, but also a wide variety of other popular styles and themes. With all due respect to Bob Wills, Adolph Hofner can also lay claim to a share of the credit for pioneering and spreading the popularity of Western Swing music from Texas to California and around the world. To the best of my knowledge, there are only three CDS currently available that have any significant number of recordings by Adolph Hofner. In addition, there is one out-of-print LP that you will want to put your hands on. Arhoolie\Folklyric CD 7029 -- South Texas SwingWe are fortunate, indeed, to have this exceptional collection of recordings by "Adolph Hofner and his Texans" readily available on CD. The following review is lifted from the Arhoolie Records web site. Adolph and Emil Hofner were born in the late 1920s to German-Czech parents and base their musical careers out of San Antonio (yes, they're are still active). This set spans 1936-1949, when they fronted one of the premier Western swing ensembles. Adolph's smooth crooning is the anchor point around which hot solos from fiddler J. R. Chatwell, steel player Emil Hofner and banjoist Cotton Cooper, among others, ply their trade. In addition to swing, the brothers were adept at Czech music, with vocal duets and polkas, several of which grace this disk. Finally there is a 7-minute excerpt from one of their radio shows. A Fine tribute to one of the great, if under-appreciated, talents of Texas and Tex-Czech music.
The 25 selections on this 75-minute CD include:
Better Quit It Now, How I Miss You Tonight, Dirty Dog, We Played a Game, Does My Baby Love Me, Yes Sir!, I'll Keep My Old Guitar, Brown Eyed Sweet, Maria Elena, Spanish Two-Step, Why Should I Cry Over You?, Joe Turner Blues, Sam, the Old Accordian Man, Alamo Rag, South Texas Swing, Jessie Polka, Sage Brush Shuffle, Cotton-Eyed Joe, Paul Jones, Starkovarna, Strashidlo, Dis Ja Liebe Spim, Na Marjanse, Julida Polka, Kelley Waltz, and Longhorn Stomp. The radio broadcast, complete with Pearl Beer commercial, includes the tunes: You Can't Break My Heart, Draggin' the Bow, Hang Your Head In Shame, and the Pearl Beer Theme. Arhoolie/Folklyric CD 7026 -- The Texas-Czech, Bohemian, & Moravian Bands Five numbers by Hofner are to be found on this disc. Once again, remarks lifted from the Arhoolie Records website: This is Texas music with that unmistakable southwest flavor and swing. It is also music from the old country central Europe, where the polkas, waltzes, marches, mazurkas, and other folk dances originated. These recordings, made between 1929 and the late 1950s, are energetic, joyful, sometimes sentimental, hybrid dance music, played by mostly amateur musicians, often members of family bands, who have kept many of these melodies and songs alive for the past hundred years or more. Lyle Lovett fell in love with this CD and played it over the PA system at various concerts as the public filed in! The tracks featuring Hofner's group (all sung in Czech!) are:
And the review found at that site: This mammoth 77-minute, 27-track CD is an entertaining excursion into Central European Music after it migrated to the U.S. Southwest. The German accordion's influence on Cajun and Hispanic cultures has already been well-documented, but here we can hear how the musical content of those immigrant cultures was infused into existing musics of Texas. These are top-notch polkas, waltzes, and marches played by bands that feature brass and reeds and violins and even hammered zither instruments. The Baca family, the Hofner family and Joe Patek's Ork. are prominently featured, and probably were the most influential in the community that exists even today in Texas. Adolph Hofner is the best-known of these musicians because of his side trip into Western Swing. This CD pleases me greatly. One other CD, actually a double-disk entitled "Adolph Hofner and the Pearl Wranglers," which I have not seen or heard, is available on the Sarg label. You may inquire to: Sarg Records, 311 E. Davis St., Luling, TX 78648. I am told that there is also an interactive CD-ROM disk entitled Honkytonk Texas USA, offered through 3B Information Systems, P.O. Box 92454, Austin, TX 78709. Rambler 108 -- Oh! Swing It. This collection of recordings by Jimmie Revard and his Oklahoma Playboys is well worth tracking down. I don't think it's available on CD, but this 1982 LP contains 16 tunes recorded between 1936 and 1938, all of which feature Adolph and/or Emil Hofner. Among the tracks found on this disc are the ever-popular "Bound To Look Like A Monkey," as well as the always enjoyable "Deep Elm Blues," featuring Adolph on vocal. You'll love the piano by Eddie Whitley on many of these tracks and he even takes the vocal on such numbers as the slightly risque "Big Daddy Blues." Except for the fact that Jimmy Revard was the titular leader (and considering the sidemen), this group could just as easily have been billed as "Adolph Hofner and his Boys." You'll recognize the album by the fact that the color picture shown earlier on this page is on the cover. It's worth whatever you'll pay simply for the extensive notes by Marty Pahls and Jeff Richardson, some of which has been shamelessly plagiarized here and from which the following paragraph is an excerpt: We were always happy," recalls Jimmie fondly. "We did our best. Whatever they wanted, we'd go out and play for the people, and do a lot of grinnin' and yellin' and whoopin' and hollerin' and dancing around ... In other words, whatever we did, we sold it. Old Adolph and Bash, they'd get up and they'd sell the hell out of it, and we's all cuttin' up. Emil Hofner picked up the nickname "Bash" from Jimmie Revard. Emil once admitted: "Yeah, I'se too bashful to talk to girls till I learned what they's for." The "good time" nature of this music is attested to by contemporary artist Ted Roddy who has kept clubs, bars, and juke-joints of his native Texas jumping since the late 70's. According to his record company's press release: The first band that Roddy ever saw live was Adolph Hofner and the Pearl Wranglers. "He had a drummer that could keep the beat with one hand and guzzle beer with the other," says Roddy. "That really impressed me." Those of you with browsers that support certain music players may now click the little black right-pointing arrowhead and listen to Adolph Hofner playing "Better Quit It Now" recorded on April 5, 1938. Some of you heard it when this page first loaded. [32 seconds -- 345K]
Adolph Hofner's 50th anniversary in the music business was celebrated when his favorite dance hall in San Antonio, The Farmer's Daughter, sponsored a benefit fund raiser to defray the cost of health expenses for this valued and well-loved musician. More than half a century has passed since Adolph Hofner and his boys first set foot in a recording studio and took a major step toward regional and national popularity. Shucks, their music is still popular today if you know where to go and who to ask! The following, by a gentleman named Lee Nichols, was originally printed in The Austin Chronicle and is reprinted with permission: Luckenbach, June 1, 1996A lesson I've learned in recent years is that once a legendary performer gets up in years, you'd better not miss a chance to see them. This wisdom has come to me the hard way. I had tickets to Dizzy Gillespie's last appearance here, but sold them to study for an exam -- now he's gone. Canray Fontenot, the amazing Creole fiddler, made a trip to the Broken Spoke a few years back -- I didn't go, and he died last year. So when I heard that 80-year-old Western swing legend Adolph Hofner was coming to Luckenbach... well, forgive me for sounding morbid, but I wasn't about to let him get away. I was rewarded for this with an extremely pleasant day in the small town of great reknown. We arrived in the late afternoon, and relaxed with opener Kent Finlay and the San Marcos songwriter's 17-year-old prodigy daughter Jenni on the fiddle (keep an eye on her in the near future). We kicked back around the general store/bar, sucking down a few cold Celis Bocks and watching people pitch washers. After a fun set with Oma & the Oompahs, one of the Hill Country's more enjoyable polka bands, we anxiously awaited the arrival of the main attraction. When a car finally pulled up and somebody unfolded a wheelchair, I felt a twinge of excitement that I rarely feel after nearly a decade of interviewing celebrities. Decked out in his Pearl Beer shirt (which he and his Pearl Wranglers wore through several years of sponsorship by that company), Hofner emerged, smiling and laughing and clearly ready to put on a show. Adolph has slowed a step -- well, several, really -- since his heyday in the Thirties, when he was a heartthrob crooner who drew comparisons to Bing Crosby and ruled the Western Swing world in South Texas. I was disappointed that he only treated us to vocals on three songs, but when he did sing, his voice was still surprisingly robust; it was particularly a thrill to have him sing one in Czech, his first language. The spaces in between were still satisfying, however, as his daughter Darlene led his crack band (including musicians who had played with him for decades) through a solid set of great dancehall classics, while he emceed. As my girlfriend and I twirled around the dance floor, he shot me a grin -- I think he probably got a kick out of seeing a young, pony-tailed hippie shuffling to his music. I had to shake his hand after the show. I had to touch this living piece of Texas music history. A modest crowd of only 50 or so were there to recognize that there was more to Western Swing than Bob Wills, and I wanted to make sure Hofner knew that a new generation of Texans still loved his work. I hope he'll stick around for several more such wonderful evenings. A changing marketplace and age forced Adolph Hofner to slow down in his later years, but he had also begun receiving increased recognition for his accomplishments. Among the honors and awards bestowed to date:
In his final years, Mr. Hofner was sought after for interviews by college professors, students, and authors, as well as TV and radio personalities, all seeking to get a first-hand story from a country music legend. I am grateful to his daughter Kathy Hofner Fielding, his grandson Douglas Alan Fielding, and his granddaughter Lesley Fielding who have supplied additional information that greatly enhanced the updates of this page.
Adolph Hofner died on June 2, 2000, |
|
Just click one of these icons and bookmark or make a favorite of the page it takes you to. Thereafter, your purchases from Amazon will produce a small credit to yours truly. The eBay icon takes you to a list of items that my alter ego, Otto, is offering at auction this week. Donations Are Welcome If you are one of those rare angels who would like to make a modest donation to support my efforts, you may do so by clicking the Pay Pal "Donate" image and filling in the pertinent information that will appear on the next screen. It's fast and easy and your surprising generosity will be greatly appreciated. MORE? Many other areas of the "Popular Culture Excavation Site" await you. Full descriptions are on the main menu or go directly to the area of your choice by clicking one of these seductive little images. |
Go back to the Western Swing page.
Return to the main menu.
Hey wait, let's click the image and take a look at a larger version of this great Pearl Beer neon sign! Who's the lucky bum that has this sign on his kitchen foyer wall? |
|
On May 18, 2002, the 5th anniversary of it's existence, hosting of this page was transferred from Yahoo/GeoCities to an independent server. You are the most recent of the #!/usr/local/bin/perl5
use GD;
alarm(600);
# cgi-bin access counter program
# Version 4.0.7
#
# Copyright (C) 1995 George Burgyan
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or (at
# your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# A full copy of the GNU General Public License can be retrieved from
# http://www.webtools.org/counter/copying.html
#
# gburgyan@webtools.org
#
# George Burgyan
# 1380 Dill Road
# South Euclid, OH 44121
#
# For more information look at http://www.webtools.org/counter/
########################################################################
#
# CHANGE THESE TO SUIT YOUR SITE
#
# The default language option (english, french, swedish)
$default_lang = "english";
# The name of the file to use. You should probably give this an absolute path
$FileName = "$ENV{'DOCUMENT_ROOT'}/counter/access_count";
# Replace with a list of regular expression IP addresses that we
# are supposed to ignore. If you don't know what this means, just use
# "\." instead of periods. Comment out entirely to ignore nothing.
#@IgnoreIP = ("199\.18\.203\..*",
# "199\.18\.159\.1",
# );
# Aliases: Set this up so that diffent pages will all yield the same
# count. For instance, if you have a link like "index.html -> home.html"
# set it up like ("/index.html", "/home.html"). Make sure you give a full
# path to it. This will treat "/index.html" as if it were "/home.html".
%Aliases = ("/fakename.html", "/realname.html",
"/index.html", "/home.html",
);
# AUTOMATICALLY SET BY INSTALL!! Modify only if necessary!!!
#
# BaseName: set to whatever you have counter installed as. This is
# used to derive the arguments. No not touch the next comment.
### AUTOMAGIC ###
$BaseName = "counter";
# counter or counterbanner or counterfiglet
#
# Outputs the number of times a specific page has been accessed.
# The output depends on which page 'called' it, and what the program
# is named:
#
# The counter can "take arguments" via its name. That is, if you tack
# -arg to the end of the program name, -arg is taken to be an argument.
# For example, if you call the counter 'counter-ord', '-ord' is considered
# an argument, and an ordinal count (1st, 2nd, 3rd, ...) will be printed
# instead of (1, 2, 3, ...). Note that counterord does the same thing as
# counter-ord for backward compatibility.
#
# Currently recognized arguments:
#
# -f=font sets "font" to be the font for figlet
# -lang=lang sets the language used to ordinalize to "lang"
# -nc no count; don't to write the incremented count back to the file
# -nl no link; don't automatically generate a link
# -nd no display; don't display anything, just count
# -ord make an ordinal count instead of regular
# -doc=document override the DOCUMENT_URI environment variable
#
# Example: counterfiglet-ord-f=bigfont-nc
#
# This will cause the counter to call figlet as the output routine, printing
# in a big font an ordinal count, without updating the access count file.
# Note that the order of arguments is irrelevant so long as you spell the
# file name correctly. It is generally assumed that the ability to take
# different arguments/use different output routines is done with symlinks:
# i.e. ln -s counter counterfiglet-ord-f=bigfont-nc
#
# More complete documentation can be found at
# http://www.webtools.org/counter/
#
########################################################################
#
# Thing that shouldn't really need changing, but are configurable anyway.
#
# Maximum number of times to try to lock the file.
# Each try is .1 second. Try for 1 second.
$MaxTries = 10;
# Set this to point to something, or comment it out, and it
# won't be a link at all.
# $Link = "http://www.webtools.org/counter/";
# Whether or not to use locking. If perl complains that flock is not
# defined, change this to 0. Not *really* necessary because we check
# to make sure it works properly.
$UseLocking = 0;
# What version of the counter file format are we using?
$FileVersion = "02.000";
# Common names of the counter to install...
@CommonExtensions = ("-ord", # Ordinam
"figlet", # Figlet'ed
"figlet-ord",# Ordinal figlet
"banner", # Bannered
"banner-ord",# Ordinal banner
);
#
#########################################################################
#
# Misc documents to refer people to in case of errors.
#
$CreateFile = "[Error Creating Counter File -- Click for more info]";
$AccessRights = "[Error Opening Counter File -- Click for more info]";
$TimeoutLock = "[Timeout locking counter file]";
$BadVersion = "[Version access_count newer than this program. Please upgrade.]";
#########################################################################
#
# The actual program!
### Stage 1
###
### Parse the arguments... (just ignore this part)
# Get arguments from program name. Argh...what a horrible way to do it!
$prog = $0;
$prog =~ s/(\.cgi|\.pl)//; #strip .cgi|.pl name extension
$prog =~ s!^(.*/)!!; # separate program name
$prog =~ s/\\(.)/sprintf("%%%02x", ord($1))/ge; # quote \c to %xx
($printer, @args) = split(/-/, $prog); # args are separated by dashes
$printer =~ s/%(..)/pack("c", hex($1))/ge; # unquote printer function name
$printer =~ s/$BaseName/counter/; # Make it cannonical.
# This gets path info, which is only applicable if you are using our
# ssis script (see above). This makes counter/ord the same as counter-ord
push(@args, split("/", $ENV{"PATH_INFO"})) if $ENV{"PATH_INFO"};
# put them in assoc array %arg
foreach (@args) # means do this for each element in the array
{
s/%(..)/pack("c", hex($1))/ge; # unquote %xx
/^([^=]*)=?(.*)$/; # extract "=" part, if any
$arg{$1} = $2 ? $2 : 1;
}
if ($ARGV[0] eq '-install') {
&CheckPerl;
&SetBaseName;
&MakeCommon(0);
exit(0);
}
if ($ARGV[0] eq '-installforce') {
&CheckPerl;
&SetBaseName;
&MakeCommon(1);
exit(0);
}
if ($ARGV[0] eq '-unlock') {
open(FILE,"$FileName");
&UnlockFile(FILE);
exit(0);
}
undef $Link if $arg{'nl'}; # make link?
### Stage 2
###
### Print out the header
# Print out the header
print "Content-type: text/html\n\n";
#print "Debug 1: $ConfName Debug 2: $FileName"; ### Stage 3 ### ### Open the access_count file for read-write taking all the precautions # Make sure the file exists: if (!(-f $FileName)) { if (!open (COUNT,">$FileName")) { # Can't create the file print $CreateFile; exit 1; } else { # We got the file, print out the version number print COUNT "$FileVersion\n"; $version = 2; } } else { if (!((-r $FileName) && (-w $FileName))) { # Make sure that we can in fact read and write to the file in # question. If not, direct them to the FAQ. print $AccessRights; exit 1; } if (!open (COUNT,"+<$FileName")) { # Now make sure it *really* opens print $AccessRights; # ...just in case... exit 1; } # Try to read in a version number $version = ";
};
}
sub comment1 {
# create a new image
print "Content-type: image/gif\n\n";
$im = new GD::Image(100,100);
# allocate some colors
$white = $im->colorAllocate(255,255,255);
$black = $im->colorAllocate(0,0,0);
$red = $im->colorAllocate(255,0,0);
$blue = $im->colorAllocate(0,0,255);
# make the background transparent and interlaced
$im->transparent($white);
$im->interlaced('true');
# Put a black frame around the picture
$im->rectangle(0,0,99,99,$black);
# Draw a blue oval
$im->arc(50,50,95,75,0,360,$blue);
# And fill it with red
$im->fill(50,50,$red);
# Convert the image to GIF and print it on standard output
print $im->gif;
}
### Stage 11
###
### Check if we are supposed to update the count in the file. (ie. we're
### not ignoring the host that just accessed us)
# Make sure we are not ignoring the host:
$ignore = 0;
$ignore = grep($ENV{"REMOTE_ADDR"} =~ /$_/, @IgnoreIP) if defined ($ENV{"REMOTE_ADDR"});
$ignore = $ignore || $arg{"nc"};
### Stage 12
###
### Actually write the updated information back to the file
if (!$ignore) # If we aren't ignoring this access
{
# Now update the counter file
seek(COUNT, $location, 0);
$longaccesses = sprintf("%010.10d", $accesses);
$hexflags = sprintf("%04.4x", $flags);
print COUNT "'$doc_uri' $longaccesses $hexflags\n";
}
&UnlockFile(COUNT);
close COUNT;
#######################################################################
#
# Support functions
#
# translate_output
#
# Quote any special characters with HTML quoting.
sub translate_output {
local($string) = @_;
$_ = $string;
s/è/è/g;
return $_;
}
sub LockFile {
local(*FILE) = @_;
local($TrysLeft) = $MaxTries;
if ($UseLocking) {
# Try to get a lock on the file
while ($TrysLeft--) {
# Try to use locking, if it doesn't use locking, the eval would
# die. Catch that, and don't use locking.
# Try to grab the lock with a non-blocking (4) exclusive (2) lock.
# (4 | 2 = 6)
$lockresult = eval("flock(COUNT,6)");
if ($@) {
$UseLocking = 0;
last;
}
if (!$lockresult) {
select(undef,undef,undef,0.1); # Wait for 1/10 sec.
} else {
last; # We have gotten the lock.
}
}
}
if ($TrysLeft >= 0) {
# Success!
return 0;
} else {
return -1;
}
}
sub UnlockFile {
local(*FILE) = @_;
if ($UseLocking) {
flock(FILE,8); # Unlock the file.
}
}
####################################################################
#
# Installation helpers
#
# SetBaseName
#
# Change the counter program itself to set the basename
sub SetBaseName {
local($name) = $0;
$name =~ s/^.*\/([^\/]+)$/$1/; # Strip off any of the path
if ($name eq $BaseName) { # The way we're set up now!!!
return; # Don't need to change a thing.
}
if (!open(COUNTERFILE, "+<$0")) {
print "Can't modify program. Set \$BaseName manually.\n";
return;
}
print "Configuring \$BaseName variable...\n";
local($oldsep) = $/;
undef($/);
local($program) = $banner"; # return no link here (it would be annoying) } # output_counterfiglet # # An even sillier one than counterbanner. :) sub output_counterfiglet { local($count) = @_; $fig = "echo $count | /usr/games/figlet"; # setup command line $fig .= " -f $arg{'f'}" if $arg{"f"}; # use a different font? $fig = `$fig`; $fig =~ s!&!&!g; $fig =~ s! " . $fig . ""; # note no link here, either } ######################################################################### # # Conversion functions # # UpdateVersion # # Convert a version 1file into a version 2 file. sub UpdateVersion1 { local ($contents,$dummy); local ($oldsep) = $/; $/ = ""; seek(COUNT,0,0); # Go to the beginning of the file $contents = |