Too Good To #016

Today: IPv6 with EUI64, kernel panic evasion, Seahorse CLI interaction.


IPv6 with EUI64 (the thing with the hardware address) in NetworkManager

# nmcli connection modify "Wired connection 1" ipv6.ip6-privacy 0
# nmcli connection modify "Wired connection 1" ipv6.addr-gen-mode eui64

Auto-prevent crashy service from starting

We have a commercial piece of software here that can cause an irrecoverable kernel panic when starting, by loading a proprietary kernel module. Detect whether the system was previously shut down cleanly and fail the service, if not:

# /etc/systemd/system/fouled-up.service.d/prevent.conf

[Service]
ExecStartPre=echo 'Analyzing journal for clean shutdown on previous boot.'
ExecStartPre=journalctl -b -1 -g 'Shutting down.' _COMM=systemd
  • ExecStartPre – Fail the unit if this command fails.
  • journalctl -b -1 – Look at entries from previous boot.
  • -g 'Shutting down.' – Grep for entries containing this string. Returns non-zero if not found.
  • _COMM=systemd – Match entries from this command only.

Gnome session keyring / Seahorse CLI interaction

Nobody seems to really know how this works. I do however have an application password that I want to keep in the Gnome session keyring.

The documentation for secret-tool references attributes/keys and values, but there seem to be no predefined names or convention for this.

How to save and retrieve a password in the Gnome session keyring:

# apt-get install libsecret-tools
$ printf 'xxsecretxx' |
  secret-tool store --label='my application secret' application theapplication
$ secret-tool lookup application theapplication
xxsecretxx