network-manager only works with systemd

I still resist to systemd because initd just works great, i consider it mature enough and more secure, and i got a surprise when i wanted to keep initd with network-manager because it seems that network-manager now only works with systemd…. sad sad news.

But well, who knows, destiny calls.

Investigating a little i found another alternative network manager which looks pretty nice (for me), it is called wicd.

To add wicd to the fluxbox try:

vi ~/.fluxbox/startup

Add:

wicd-client -t &

 

 

 

 

Advertisements

Puppet agent: Exiting; no certificate found and waitforcert is disabled – Solution

After installing a brand new puppet master and client you may want to test the communication between them.  First you setup variable “server” in /etc/puppet/puppet.conf

Screenshot from 2017-09-21 16-19-34

You should have the puppetmaster or puppetserver up, in the same or other machine.  In this case i have setup a second independent server called “puppet01”.  If in doubt, you can test the connection to the default puppet port TCP 8140.

Screenshot from 2017-09-21 16-21-03

And it could happen that you get this error:

Screenshot from 2017-09-21 16-19-13

This happens because the puppet agent tries to reach the puppet master to receive the catalog which is later applied.  But this can happen if the master allows the certificate from the agent (client), the solution is to query the Puppet Server and see which certificates are pending to be approved:

puppet cert list

Screenshot from 2017-09-21 16-27-56

Your output may be slightly different, but the idea is the same.  If you want to allow this agent to get the catalog then you can accept this certificate.  Notice that the servername should be the same.

puppet cert sign <servername>
puppet cert sign puppet02.argentina

Or you could just accept all the certificates at once:

puppet cert sign --all

Screenshot from 2017-09-21 16-40-17

 

Installation script to add packages from Cran R

If you use the free software cran R to do data analysis and you are also that kind of person that likes to have the last version then you may be interested in this.  Many times i compile the last version of Cran R from scratch but have the problem that many packages are not automatically available for that version yet, the only solution is to download and compile them manually which is a lot of effort given all the dependencies.

I know that this is not a great solution, but it saved me a lot of time, it can be improved.

First you will need an index from the packages, you can create it so:

wget "https://cran.r-project.org/src/contrib/" -O pkgs.txt

And then you will have to run these lines a few times until all the dependencies are installed:

INSTALAR="ggplot2_2.2.1.tar.gz";
R CMD INSTALL ${INSTALAR} 2> /tmp/err
while [[ `cat /tmp/err | grep ERRO | wc -l` -ne 0 ]]; do
 i=`cat /tmp/err | grep "ERROR" | sed 's/.*dependenc[a-z]\{1,4\} //g' | sed 's/’ [are |is ].*//g' | sed 's/[,’‘]//g' | cut -f1 -d" "`;
 echo "Installing dependency $i";
 PP=`cat pkgs.txt | grep "^${i}_"`;
 if [ ! -e $PP ]; then wget "https://cran.r-project.org/src/contrib/$PP" -O $PP; fi;
 echo "Installing ${PP}";
 R CMD INSTALL ${PP} 2> /tmp/err;
done

If you want to install the “ggplot2” package, just put the package name in the variable “INSTALAR” and run the script.