In order to scan some local networks for unknown hosts (yes, on some sites you need to perform archeology), I needed the local IPv4 addresses, netmasks and CIDRs on my Mac running OS X.
Part of that is using ifconfig to get local inet information which however uses hexadecimal network masks and delivers no CIDRs.
The IP address 127.0.1.1 in the second line of this example may not be found on some other Unix-like systems. The Debian Installer creates this entry for a system without a permanent IP address as a workaround for some software (e.g., GNOME) as documented in the bug #719621.
The <host_name> matches the hostname defined in the “/etc/hostname“.
For a system with a permanent IP address, that permanent IP address should be used here instead of 127.0.1.1.
Well, I need to do that propertly another time as the first thing I bumped into was this:
PHP Fatal error: Call to undefined function imagecreatefrompng() in /srv/www/vhosts/pluimers.com-ssl/stackoverflow/imageFlair/imageFlair.php on line 42
For now I’ve fixed the first by installing php5-gd (although an SO answer suggests php-gd, openSuSE uses the php-version number for installing modules).
First of all, apparently I didn’t have all the required apache modules installed. The not-so-easy part is that apache uses two different aliases for modules: the ones listed by apache2ctl -M 2>&1 | sort are in a different format than the ones you mention in .htaccess and .conf files. Oh and of course the -M (nor the -t -D DUMP_MODULES) aren’t listed ore hinted in the apachectl documentation: that would be too easy. They are listed in the httpd2 documentation.
The .htaccess file needs mod_rewrite and mod_expires, but apache2ctl names them rewrite_module and expires_module.
Enabling these was easy, but you have to remember that a2enmod strips the prefix/suffix of the module name (I already had expires_module (shared) installed so this only shows how to enable mod_rewrite):
a2enmod rewrite
rcapache2 stop
rcapache2 start
rcapache2 status
NB: mod_rewrite wasn’t enable by default and before enabling it, read about the risks of mod_rewrite.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
The logic for copying the files is in the update_vc_libs function. The calling do_update function updates a lot more, including the firmware. So I wrote a quick pull request to just download the userland binaries:
Feature SKIP_FIRMWARE for #220: forces SKIP_KERNEL=1 and also skip the kernel.img files and the kernel modules: This effectively only installs the userland and SDK.
cd /root/bin
wget https://raw.githubusercontent.com/jpluimers/rpi-update/5a2ec0bc552436d58127cc20e3791cb5b90fd5ba/rpi-update
chmod +x rpi-update
SKIP_FIRMWARE=1 UPDATE_SELF=0 ./rpi-update
You should see this when updating:
*** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
*** We're running for the first time
*** Backing up files (this will take a few minutes)
*** Remove old firmware backup
*** As requested, not updating firmware and kernel modules
This update bumps to rpi-4.4.y linux tree
Be aware there could be compatibility issues with some drivers
Discussion here:
https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=144087
##############################################################
*** Downloading specific firmware revision (this will take a few minutes)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 168 0 168 0 0 361 0 --:--:-- --:--:-- --:--:-- 362
100 51.2M 100 51.2M 0 0 1246k 0 0:00:42 0:00:42 --:--:-- 1446k
*** As requested, not updating firmware and kernel
*** As requested, not updating firmware and kernel modules
*** Updating VideoCore libraries
*** Using HardFP libraries
*** Updating SDK
*** Running ldconfig
*** Storing current firmware revision
*** Deleting downloaded files
*** Syncing changes to disk
*** If no errors appeared, your firmware was successfully updated to 818a860cf690d64c62d3227ad9c36d5867a671c2
*** A reboot is needed to activate the new firmware
And the final goal of checking the firmware version now works:
# LD_LIBRARY_PATH=/opt/vc/lib /opt/vc/bin/vcgencmd version
Jul 15 2016 17:50:10
Copyright (c) 2012 Broadcom
version efa728fef77ea14ceb1500caf0146395fa282a0f (clean) (release)
A friend of mine made the mistake to capture some CDs using WMA files and throwing away the CDs. His old Nokia could play them, but not his new iOS and Android devices.