September 23, 2016

Prevent downloaded Flowblade 1.x from being downgraded to 0.x upon Debian upgrade

pin

I recently learned about FlowBlade, but my Debian Stable (Jessie 8.0) contained version 0.12, whereas a version 1.8 is available from https://github.com/jliljebl/flowblade/blob/master/flowblade-trunk/docs/INSTALLING.md .

I installed the .deb file using the usual sudo dpkg -i flowblade-1.8.0-1_all.deb method, but when i went to do an sudo aptitude update && sudo aptitude full-upgrade, Debian insisted on “upgrading” flowblade to version 0.12.

I searched the terms “pin” and “pinning” for apt, but that solution seemed specific to repositories. Luckily along the way, I found the correct term “hold”.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Better solution found !!! Jump to the bottom.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The solution was to put the package on hold with sudo aptitude hold flowblade, thusly full-upgrade will now not downgrade. You can conversely unhold with the similar command sudo aptitude unhold flowblade.

One unlikeable caveat however, is that it will still show up as an available update: aptitude search "~U". Since I use Updates: ${execi 360 aptitude search "~U" | wc -l | tail} in my conky setup, it looks like there is always an update to install, which is wrong.

Conky View

Do you have a better solution? Please share!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Better solution found !!! Do NOT “hold” as described above, instead “Pin” the package as described below:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Edit your /etc/apt/preferences and add the following block:

Package: flowblade
Pin: version 1.*
Pin-Priority: 1001

This will prioritize version 1.x over version 0.x. When 2.x is released, don’t forget about editing your preferences again!

As always, good luck!

- - -


Please consider crypto tipping:
  

July 12, 2016

Erase last BASH command

enter image description here
Ever accidentally type your password on the commandline?
Want something better than editing the .bash_history file?
(Especially when you use cssh, parallel-ssh, psonsole or similar)
Below are some options:
#erase last command (least efficient)
history -d $(history | tail -n 2 | head -n 1 | awk '{print $1}')

#erase last command (more efficient)
history -d $(history | awk 'END{print $1-1}')

#erase last command and self (best)
history -d $(($HISTCMD-2)) && history -d $(($HISTCMD-1))

#ultimately add alias to .bashrc
alias eraselastcmd='history -d $(($HISTCMD-2)) && history -d $(($HISTCMD-1))'

#clear current session history
history -c

#don't save session history starting now
unset HISTFILE

#delete lines containing SOMETEXT from ~/.bash_history
 sed -i '/SOMETEXT/d' ~/.bash_history
Related options that can be set in ~/.bashrc
export HISTCONTROL=ignoreboth         # ignore duplicates and commands with " " (space-prefixed)
export HISTSIZE=                      # unlimited history
export HISTFILESIZE=                  # unlimited history
shopt -s histappend                   # append to history, don't overwrite it
export HISTIGNORE="ls:pwd:exit:date"  # do not record specified commands
-
good luck


Please consider crypto tipping:
  

June 07, 2016

vCSA 6 not sending email alerts


Thanks to AdminAfterWork.com's  for providing the reason and solution to my vCSA6 not email alerting.

http://adminafterwork.com/linux-based-vcenter-server-appliance-vcsa-bug-vcenter-email-notifications-sent-using-multiple-email-addresses-action-sending-notification-emails/

tl;dr: Use only one email recipient per action.
Please consider crypto tipping: