Some bits of grep usage are where I disagree with Shellcheck
I have come to very much like shellcheck and now automatically use it on any shell script I'm writing or revising(at least any scripts for work; personal ones I'm sometimes lazier with).Although some of its issues are a little bit picky, using it is goodfor me so I go along with them. Well, with oneexception, because I cannot go along with Shellcheck's views on usingegrep and fgrep.
If you've used Shellcheck on scripts, especially older ones,
We're (temporarily) moving to three way mirrored disks on our servers
We've been using mirrored (system) disks on our servers for a fairwhile now. Initially we reserved it for 'important' systems, butafter a few too many failures and close calls we decided to makeit pervasive for anything except test machines and completelygeneric ones . Then, a week ago we had adisk failure on our central Exim mail server, which handles allinternal deliveries and forwarding. On the one hand this wasn't aproblem, because it had mirrored system disks and so one
Some ways that servers make their disks not hot-swappable
In yesterday's entry , I mentioned that noneof our current crop of basic 1U servers havehot-swappable drive bays. A commentator then asked:
What exactly makes a "hot-swappable" disk bay? I had assumed that allSAS and SATA connections are always hot-swappable, with maybe the onlydifference being whether the OS gets automatically poked about newconnections or not...
Since I am a little bit grumpy about this, here are some of theways that servers can have drive bays
If you use GNU Grep on text files, use the -a (--text) option
Today, I happened to notice that one of my email log scanning scriptswasn't reporting on a log entry that I knew was there (because another,related script was reporting it). My log scanning script starts out witha grep to filter out some things I don't want to include:
grep -hv 'a specific pattern' "$@" | exigrep '...' | [...]
I had all sorts of paranoid thoughts about whether I had misunderstoodexactly what the
ZFS on Linux has now become the OpenZFS ZFS implementation
The other day I needed to link to a specific commit in ZFS onLinux for my entry on how deduplicatedZFS streams are now deprecated , so I went to the ZFS on Linux Github repository ,which I track locally. Somewhat to my surprise, I wound up on theOpenZFS repository , which is nowdescribed as 'OpenZFS on Linux and FreeBSD' and is linked as suchfrom the open-zfs.org page that links to all of them .
(The OpenZFS repo really is a renaming of the ZFS on
The appeal of doing exact string comparisons with Apache's RewriteCond
I use Apache's RewriteCond afair bit under various circumstances, especially here on WanderingThoughts where I use it in .htaccess to block undesirablethings ( cf ). The default RewriteCondaction is to perform a regular expression matches, and generallythis is what I want; for instance, many web spiders have user agentsthat include their version number, and that number changes overtime. However, recently I was reminded of the power and utility ofdoing exact string matches for some circumstances.
Suppose, not hypothetically,
'Deduplicated' ZFS send streams are now deprecated and on the way out
For a fair while, ' zfs send ' has had support for a -D argument, aka--dedup, that causes it to send what is called a 'deduplicated stream'.The zfs(1) manpage describes thisas:
Generate a deduplicated stream. Blocks which would have been sentmultiple times in the send stream will only be sent once. Thereceiving system must also support this feature to receive adeduplicated stream. This flag can be used regardless of the dataset's
dedupproperty, but performance
Why my commit messages for configuration files describe my changes
Over the years, I have wound up adopting a particular and somewhatunusual style of commit message for many of my changes to systemfiles like /etc/group , to things like DNS and DHCP control files,and to configuration files. The unusual thing I do is that in mycommit message I don't just say why the change is being made, I saywhat the change itself is (in the abstract). For instance, for achange to our /etc/group , I might say "
Why you want a Linux bootloader even on UEFI systems
One of the reactions to my entry on the complexity of Linuxbootloaders is to say that all of this isunnecessary on modern UEFI systems. On a UEFI system, you can justput all of your Linux kernel environments in the EFI systempartition and give them (U)EFI boot menu entries to let the user choosebetween them. Unfortunately there are a number of problems withthis on anything except the simplest systems, both in practiceand in general.
On the practical level, many systems have a very limited number
There can be differences in what malware variants anti-spam systems distinguish
For reasons beyond the scope of this entry, we're currently using ClamAV in parallel with our currentcommercial filter , running incoming emailpast both of them. In keeping an eye on our logs, one of theinteresting things I've noticed is that sometimes, one system willreport that several messages are all malware X while the othersystem thinks that the messages have different malware in them.
That's abstract, so let me make it concrete. Recently, PureMessagerecognized what it called ' CXmail/OleDl