Network Manager post-up script (dispatcher script)

2015-09-07 1 min read Fedora

Network manager is supposed to be much better than network, how so?

it supports dnsmasq for one…

Dnsmasq with netowrkmanager

Local name resolution

Also Network Manager supports dispatcher scripts. How can that help? For one, I used to send interface up emails. To do so, all I had to do was put the following script in “/etc/NetworkManager/dispatcher.d”

#!/bin/sh

cd /etc/sysconfig/network-scripts
. ./network-functions

[ -f ../network ] && . ../network

# Notify programs that have requested notification
IF=$1
STATUS=$2

cat

dnsmasq local name resolution with NetworkManager

2015-08-27 1 min read Fedora Vurtualization

Network Manager suports starting dnsmasq which helps you have a local cache for DNS thus getting faster resolution for the DNS queries.

Dnsmasq with netowrkmanager

So, one thing that I have been thinking about is having a local name resolution for the VMs. So, I wanted something like this to work:

vm1 => 172.17.42,1

vm2 => 172.17.42,2

and so on …

To achieve this and reverse dns to work, we will add the entries in file “/etc/NetworkManager/dnsmasq.d/hostnames“. Just one more problem, adding so many entries manually? So, to help you with that, I created this small script:

Continue reading

ShellCheck – check basic POSIX shell script errors

2015-08-03 1 min read Bash Fedora

Here is description of the tool:

Description : The goals of ShellCheck are:
  • To point out and clarify typical beginner’s syntax issues,
    :   that causes a shell to give cryptic error messages.
  • To point out and clarify typical intermediate level semantic
    :   problems, that causes a shell to behave strangely and
    :   counter-intuitively.
  • To point out subtle caveats, corner cases and pitfalls, that may
    :   cause an advanced user’s otherwise working script to fail under
    :   future circumstances.

To install

Continue reading

evvsubst – substitute variables in text in shell

2015-07-09 1 min read Fedora Linux

First you need to install gettext, which by the way might be already installed, however you can install with

dnf install gettext

Details of the package:

Name        : gettext
Arch        : x86_64
Epoch       : 0
Version     : 0.19.4
Release     : 4.fc22
Size        : 4.6 M
Repo        : @System
Summary     : GNU libraries and utilities for producing multi-lingual messages
URL         : http://www.gnu.org/software/gettext/
License     : GPLv3+ and LGPLv2+
Description : The GNU gettext package provides a set of tools and documentation for
producing multi-lingual messages in programs. Tools include a set of
conventions about how programs should be written to support message
catalogs, a directory and file naming organization for the message
catalogs, a runtime library which supports the retrieval of translated
messages, and stand-alone programs for handling the translatable and
the already translated strings. Gettext provides an easy to use
library and tools for creating, using, and modifying natural language
catalogs and is a powerful and simple method for internationalizing
programs.

Usage examples:

Continue reading

Easily monitor and archive your system log reports.

2015-06-29 3 min read Fedora Linux

If you want to monitor your server logs and also like them to be emailed then just Logwatch may not be sufficient. It sends you a mail but does not archive them, so head over to epylog

Name        : epylog
Arch        : noarch
Epoch       : 0
Version     : 1.0.7
Release     : 9.fc22
Size        : 151 k
Repo        : fedora
Summary     : New logs analyzer and parser
URL         : https://fedorahosted.org/epylog/
License     : GPLv2+
Description : Epylog is a new log notifier and parser which runs periodically out of
cron, looks at your logs, processes the entries in order to present
them in a more comprehensive format, and then provides you with the
output. It is written specifically with large network clusters in mind
where a lot of machines (around 50 and upwards) log to the same
loghost using syslog or syslog-ng.

To install :

Continue reading

tlp – optimize and maximize your battery power.

2015-06-22 1 min read Fedora

So, you are having issues with battery life on linux. Then head over to tlp project.

TLP brings you the benefits of advanced power management for Linux
without the need to understand every technical detail. TLP comes
with a default configuration already optimized for battery life.
Also an optional install of the smartmontools package enables hard
disk SMART data in tlp-stat (smartctl).

Install with following command

 

dnf install tlp
#or
yum install tlp

retext – Editor for restructured text

2015-05-15 1 min read Fedora Learning

restructured text is a simple text editor for markdown/restructured text which can show preview as well. So, here is some details on same :

Name        : retext
Arch        : noarch
Epoch       : 0
Version     : 5.0.1
Release     : 7.fc22
Size        : 412 k
Repo        : @System
Summary     : Text editor for Markdown and reStructuredText
URL         : http://sourceforge.net/p/retext/home/ReText
License     : GPLv3+
Description : ReText is a simple but powerful text editor for Markdown and reStructuredText.

Continue reading
Older posts Newer posts