- Home »
- Page with a long title »
- Subpage with also a long title »
- Subsubpage with again a long title »
- Current location
LM-sensors config file
I have a X7SPA-HF server board from SuperMicro and it’s sensor readings where off. Thanks to the config file contributed to lm-sensors by Scott Shanafelt this should be solved. I have copied the config file below: (more…)
Phing 2.4.4 and booleans as strings
A note to self (and hopefully preventing others from having to find this out the hard way): using Phing with booleans as strings may cause unwanted sideeffects. See below for more info:
I’m using a ReplaceRegexp filter to change WordPress’ wp-config.php file. In this file a constant WP_DEBUG is defined false and I would to change it to true. I have defined the regex and provided a property with a string “true”. However this string will be casted to a bool and causes strange sideeffects.
Consider this build.xml example:
<!– setup wp config specific properties –>
<property name=”wp_config.wp_debug” value=”true” />
<!– Setup the wp-config file –>
<!– thanks to http://stackoverflow.com/questions/974963/phing-and-wordpress-configuration –>
<target name=”setup-wp-config” description=”Copies the wp-config-sample.php to wp-config.php and sets up the parameters for the test site”>
<copy file=”./wp-config-sample.php” tofile=”./wp-config.php”>
<filterchain>
<replaceregexp>
<regexp pattern=”(define\(‘WP_DEBUG’, )\w+(\);)” replace=”\1${wp_config.wp_debug}\2″/>
</replaceregexp>
</filterchain>
</copy>
</target>
If you would run this it would not work as expected. Changing the property to “foo” it does work as expected. This is probably related to this thread:
http://phing.tigris.org/ds/viewMessage.do?dsForumId=1083&dsMessageId=958537
Using the workaround in the thread the example becomes:
<!-- setup wp config specific properties -->
<property name="wp_config.wp_debug" value="(bool)true" />
<!-- Setup the wp-config file -->
<!-- thanks to http://stackoverflow.com/questions/974963/phing-and-wordpress-configuration -->
<target name="setup-wp-config" description="Copies the wp-config-sample.php to wp-config.php and sets up the parameters for the test site">
<copy file="./wp-config-sample.php" tofile="./wp-config.php">
<filterchain>
<replaceregexp>
<regexp pattern="(define\('WP_DEBUG', )\w+(\);)" replace="\1${wp_config.wp_debug}\2"/>
</replaceregexp>
</filterchain>
</copy>
</target>
Thus by adding the type (bool) to the property value forces Phing to work correctly with boolean values as strings. Thanks Hans Lellelid for this workaround!
A bug has been filled with Phing. See this ticket #633
<!-- setup wp config specific properties -->
<!-- Setup the wp-config file -->
<!-- thanks to http://stackoverflow.com/questions/974963/phing-and-wordpress-configuration -->
init not found message after updating Ubuntu
This is just a quick note to self in case an update of Ubuntu fails and only show the cryptic message ‘init not found’. I’ve found these instructions on the Ubuntu Forums made by the user with the intriguing nickname DryChilli:
“Some instructions:
List your partitions:
ls /dev/sd*
If you haven’t got an encrypted disk just do (where sda5 is the corrupted
partition):
fsck /dev/sda5
If you are using an encrypted hard-disk (i do) do
sudo cryptsetup luksOpen /dev/sda5 something
where sda5 is the encrypted partition and someting is the name under which
you will find the partition (/dev/mapper/something).
The install Lvm and look for volumes :
sudo apt-get install lvm2
sudo pvscan
sudo vgscan
The last command should list the at least one volume-group
Enable it or the ones you’re interested in
sudo vgchange -a y groupname
Now list the logical volumens
sudo lvscan
Your drive you’re interested in should now appear under /dev/mapper
do a fsck
sudo fsck /dev/mapper/logical-volume
Lots of errors! Off course you want to have them all fixed. REBOOT!
This worked for me!”
Contactgegevens
Terzijde
The first step — especially for young people with energy and drive and talent, but not money — the first step to controlling your world is to control your culture. To model and demonstrate the kind of world you demand to live in. To write the books. Make the music. Shoot the films. Paint the art.Chuck Palahniuk
