grml-scripts.git
7 months agoRelease new version 2.13.0 master v2.13.0
Michael Prokop [Wed, 6 Sep 2023 15:26:11 +0000 (17:26 +0200)]
Release new version 2.13.0

7 months agoDrop broken and deprecated vmware-detect
Michael Prokop [Fri, 1 Sep 2023 11:20:55 +0000 (13:20 +0200)]
Drop broken and deprecated vmware-detect

It was reported that this tool no longer works as expected,
though virt-what and systemd-detect-virt exist nowadays.

Thanks: András Korn

14 months agoRelease new version 2.12.2 v2.12.2
Michael Prokop [Fri, 3 Feb 2023 16:26:33 +0000 (17:26 +0100)]
Release new version 2.12.2

14 months agoMerge remote-tracking branch 'origin/github/pr/17'
Michael Prokop [Thu, 2 Feb 2023 14:26:42 +0000 (15:26 +0100)]
Merge remote-tracking branch 'origin/github/pr/17'

15 months agoFix `grml2ram` when booted via `loopback.cfg`
Michael Schierl [Sat, 14 Jan 2023 20:56:38 +0000 (21:56 +0100)]
Fix `grml2ram` when booted via `loopback.cfg`

When booted from a multiboot USB stick via loopback.cfg (or when using
`findiso=` kernel option manually), `/dev/loop0` is used for the ISO file and
`/dev/loop1` for the squashfs image.

Therefore, changing backing file descriptor of `/dev/loop0` will fail. Call `losetup` to find the name of
the loop device associaed to the squashfs image instead.

16 months agoRelease new version 2.12.1 v2.12.1
Michael Prokop [Mon, 28 Nov 2022 07:35:28 +0000 (08:35 +0100)]
Release new version 2.12.1

16 months agoMerge remote-tracking branch 'origin/github/pr/16'
Michael Prokop [Mon, 28 Nov 2022 07:34:19 +0000 (08:34 +0100)]
Merge remote-tracking branch 'origin/github/pr/16'

16 months agogrml-resolution: Quick 'n dirty xrandr output parser fix
Darshaka Pathirana [Sun, 27 Nov 2022 12:29:51 +0000 (13:29 +0100)]
grml-resolution: Quick 'n dirty xrandr output parser fix

The xrandr output parser of grml-resolution seems to be broken since at
least Grml 2014.11: grml-resolution does not list possible resolutions
but its corresponding refresh rates.

It seems like once upon a time xrandr had a 'size-index' in front of
each resolution. This is not the case anymore and there does not seem to
be an option to add that behaviour back to xrandr.
So, CURRENT_NUM did not receive the 'size-index' of the current
resolution, therefor I dropped that variable which was used to detect if
the user had chosen the current resolution (nothing bad happens if
xrandr sets the current resolution).

We now list the possible resolutions and refresh rates, separated by an
underscore because `dialog` does not like spaces.
xrandr -s works fine with the chosen 'index' from dialog.

Closes: grml/grml-scripts#14

17 months agoRelease new version 2.12.0 v2.12.0
Michael Prokop [Fri, 25 Nov 2022 08:51:01 +0000 (09:51 +0100)]
Release new version 2.12.0

17 months agoMerge remote-tracking branch 'origin/github/pr/15'
Michael Prokop [Fri, 25 Nov 2022 08:48:34 +0000 (09:48 +0100)]
Merge remote-tracking branch 'origin/github/pr/15'

17 months agoSet SHELL variable in run-welcome + run-screen
Darshaka Pathirana [Sat, 12 Nov 2022 16:18:35 +0000 (17:18 +0100)]
Set SHELL variable in run-welcome + run-screen

By default login(1) is called by agetty(8) and sets the SHELL variable
"according to the appropriate fields in the password entry".

Our tty1 calls run-welcome, tty2 - tty4 call run-screen and tty5 - tty7 call
agetty (with autologin grml). So, our tty1 - tty4 bypass agetty(8) + login(1)
and (should) end in a the zsh shell (via the welcome-screen or GNU/screen)
without the SHELL variable set.

run-welcome is designed to be started (only) on tty(1) and starts zsh anyway.
But as we bypass login(1) the SHELL variable is not set.
The same is true for run-screen, but instead of starting the zsh as
login-shell, `screen` is called and runs the shell defined by the SHELL
variable or /bin/sh if not defined.

So, we ended up using the systemd "Environment"-option to set the SHELL
variable (grml/grml-live@6871972 + grml/grml-live@7422d31).
Although this is a working solution, setting the SHELL variable in run-welcome
+ run-screen makes it more transparent, that the script is actually responsible
to set the SHELL variable.

While debugging this problem, also noticed that screen should start the shell
as login-shell (like all other ttys). To do so the given shell command needs to
be prefixed with the '-' character.

grml/grml-live@6871972 + grml/grml-live@7422d31 can/should be reverted
after this change has been applied.

Issues: grml/grml#135 + grml/grml#14

17 months agoRelease new version 2.11.2 v2.11.2
Michael Prokop [Fri, 11 Nov 2022 16:01:51 +0000 (17:01 +0100)]
Release new version 2.11.2

19 months agoiimage: replace egrep usage with grep -E
Michael Prokop [Wed, 7 Sep 2022 11:56:57 +0000 (13:56 +0200)]
iimage: replace egrep usage with grep -E

grep 3.8 deprecated support for egrep + fgrep, and now prints a warning on stderr:

| egrep: warning: egrep is obsolescent; using grep -E
| fgrep: warning: fgrep is obsolescent; using grep -F

22 months agoRelease new version 2.11.1 v2.11.1
Michael Prokop [Tue, 7 Jun 2022 13:59:41 +0000 (15:59 +0200)]
Release new version 2.11.1

22 months agogrml_chroot: fix broken mount argument handling
Michael Prokop [Tue, 7 Jun 2022 13:58:34 +0000 (15:58 +0200)]
grml_chroot: fix broken mount argument handling

Commit b4a4893b0b6 broke behavior of the grml-chroot script, as it then
passed all mount options as single argument, which then fails:

| + all_options_='-t proc none'
| + mount '-t proc none' /mnt/proc
| mount: /mnt/proc: can't find in /etc/fstab.
| + mountit sysfs sys
| [...]

Convert mount options into an array, to properly work also with quotes.

22 months agoDrop debian/compat and switch to debhelper-compat approach
Michael Prokop [Fri, 3 Jun 2022 14:48:50 +0000 (16:48 +0200)]
Drop debian/compat and switch to debhelper-compat approach

23 months agogithub actions: ensure our apt cache is up2date
Michael Prokop [Thu, 19 May 2022 09:25:23 +0000 (11:25 +0200)]
github actions: ensure our apt cache is up2date

Otherwise we might end up with outdated mirror information:

| Err:77 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 lintian all 2.62.0ubuntu2
|   404  Not Found [IP: 40.119.46.219 80]
| Fetched 4172 kB in 4s (951 kB/s)
| E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/main/l/lintian/lintian_2.62.0ubuntu2_all.deb  404  Not Found [IP: 40.119.46.219 80]
| E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Gbp-Dch: Ignore

23 months agoRelease new version 2.11.0 v2.11.0
Michael Prokop [Fri, 6 May 2022 12:08:16 +0000 (14:08 +0200)]
Release new version 2.11.0

23 months agoMerge remote-tracking branch 'origin/github/pr/11'
Michael Prokop [Fri, 6 May 2022 10:24:08 +0000 (12:24 +0200)]
Merge remote-tracking branch 'origin/github/pr/11'

2 years agogrepedit/notifyd.py: Convert to Python 3
Darshaka Pathirana [Fri, 7 May 2021 15:40:57 +0000 (17:40 +0200)]
grepedit/notifyd.py: Convert to Python 3

Run the following commands:

  % 2to3-2.7 -w usr_bin/grepedit
  % isort usr_bin/grepedit
  % black usr_bin/grepedit

In grepedit the following print statement has been split manually:

+                print(
+                    "%s:%s has changed since the grep command ran- "
+                    "not modifying this line" % key
+                )

And:

  % 2to3-2.7 -w usr_bin/notifyd.py
  % black usr_bin/notifyd.py
  % isort usr_bin/notifyd.py

In notifyd.py added some ignore statements/comments (for the examples
which were actually comments).

The following errors/warnings were fixed manually:

  ❯ flake8 --max-line-length 88 usr_bin/notifyd.py
  usr_bin/notifyd.py:201:1: E741 ambiguous variable name 'l'
  usr_bin/notifyd.py:214:5: E722 do not use bare 'except'

Variable 'l' has been renamed to 'listen' and the bare 'except' has been
changed to catch 'OSError' as described in the socket documentation:
https://docs.python.org/3/library/socket.html

grepedit + notifyd.py + osd_server.py has not been functionally tested.
Please test. (But this is not the scope of this change, as it had to be
dropped anyway as it is missing Python 3 support. If an errors occurs,
please file a bug report.)

black defaults to line length 88 and flake to 79.
Decided to go set --max-line-length 88 for flake8.

Note that osd_server.py is just a symlink to notifyd.py.

2 years agogrml-swapon.8: Fix spelling (via spellintian)
Darshaka Pathirana [Fri, 7 May 2021 14:23:41 +0000 (16:23 +0200)]
grml-swapon.8: Fix spelling (via spellintian)

2 years agoMakefile: return error if a check fails
Darshaka Pathirana [Sat, 24 Apr 2021 22:25:29 +0000 (00:25 +0200)]
Makefile: return error if a check fails

Make target pythoncheck (and codecheck) did not fail if the last tested
file was error-free. Now we set RETURN=1 if only one check fails.

While at it also created separate targets for flake8, black and isort,
but also added --keep-going option when running 'make codecheck' so that all
targets are run.

Added @ in front of each command to hide the command which makes the
output more readable.

Spellcheck SC1117 (Backslash is literal in "\n") is no longer emitted
(with shellcheck after v0.5), thats why it is removed.

Please note, that spellintian does not return an error code if an
incorrect spelling is found, that is why this ugly hack had to be
implemented.

2 years agousr_share/run-screen: Fix a couple of shellcheck warnings
Darshaka Pathirana [Fri, 5 Mar 2021 16:53:23 +0000 (17:53 +0100)]
usr_share/run-screen: Fix a couple of shellcheck warnings

- SC2046: Quote this to prevent word splitting.
- SC2006: Use $(..) instead of legacy `..`.

2 years agousr_sbin/noprompt: Fix a couple of shellcheck warnings
Darshaka Pathirana [Fri, 5 Mar 2021 16:51:55 +0000 (17:51 +0100)]
usr_sbin/noprompt: Fix a couple of shellcheck warnings

- SC2048: Use "$@" (with quotes) to prevent whitespace problems.
- SC2086: Double quote to prevent globbing and word splitting.

2 years agousr_share/run-welcome: Fix a couple of shellcheck warnings
Darshaka Pathirana [Fri, 5 Mar 2021 16:47:28 +0000 (17:47 +0100)]
usr_share/run-welcome: Fix a couple of shellcheck warnings

- Ignore SC1091: Not following: /etc/grml/sh-lib was not specified as input (see shellcheck -x).
- SC2046: Quote this to prevent word splitting.
- SC2230: which is non-standard. Use builtin 'command -v' instead.
- SC2086: Double quote to prevent globbing and word splitting.
- SC2230: which is non-standard. Use builtin 'command -v' instead.

2 years agousr_sbin/noeject: Fix a couple of shellcheck warnings
Darshaka Pathirana [Fri, 5 Mar 2021 16:44:24 +0000 (17:44 +0100)]
usr_sbin/noeject: Fix a couple of shellcheck warnings

- SC2048: Use "$@" (with quotes) to prevent whitespace problems.
- SC2086: Double quote to prevent globbing and word splitting.

2 years agoMakefile: Do not shellcheck make_chroot_jail
Darshaka Pathirana [Fri, 5 Mar 2021 16:35:58 +0000 (17:35 +0100)]
Makefile: Do not shellcheck make_chroot_jail

make_chroot_jail is not developed by the Grml-Team but causes a lot of shellcheck warnings.

2 years agousr_sbin/grml-setservices: Fix a couple of shellcheck warnings
Darshaka Pathirana [Fri, 5 Mar 2021 16:28:50 +0000 (17:28 +0100)]
usr_sbin/grml-setservices: Fix a couple of shellcheck warnings

- SC2086: Double quote to prevent globbing and word splitting.
- Ignore SC1091: Not following: /etc/grml/script-functions was not specified as input (see shellcheck -x).
- Ignore SC1091: Not following: /etc/grml/lsb-functions was not specified as input (see shellcheck -x).
- SC2086: Double quote to prevent globbing and word splitting.
- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
- SC2086: Double quote to prevent globbing and word splitting.
- SC2086: Double quote to prevent globbing and word splitting.
- SC2086: Double quote to prevent globbing and word splitting.
- SC2086: Double quote to prevent globbing and word splitting.
- SC2086: Double quote to prevent globbing and word splitting.
- SC2086: Double quote to prevent globbing and word splitting.
- SC2086: Double quote to prevent globbing and word splitting.
- SC2086: Double quote to prevent globbing and word splitting.

2 years agousr_sbin/grml-setlang: Fix a couple of shellcheck warnings
Darshaka Pathirana [Fri, 5 Mar 2021 16:18:52 +0000 (17:18 +0100)]
usr_sbin/grml-setlang: Fix a couple of shellcheck warnings

- SC2086: Double quote to prevent globbing and word splitting.
- SC2034: CMDLINE appears unused. Verify use (or export if used externally).
- Ignore SC1091: Not following: /etc/grml/script-functions was not specified as input (see shellcheck -x).
- Ignore SC1091: Not following: /etc/grml/lsb-functions was not specified as input (see shellcheck -x).
- Ignore SC1117: Backslash is literal in "\#". Prefer explicit escaping: "\\#".
- Ignore SC1091: Not following: /etc/environment was not specified as input (see shellcheck -x).
- Ignore SC1091: Not following: /etc/default/locale was not specified as input (see shellcheck -x).
- Ignore SC1010: Use semicolon or linefeed before 'fi' (or quote to make it literal).
- SC2086: Double quote to prevent globbing and word splitting.
- Ignore SC1090: Can't follow non-constant source. Use a directive to specify location.
- SC2086: Double quote to prevent globbing and word splitting.

2 years agousr_sbin/grml-setkeyboard: Fix a couple of shellcheck warnings
Darshaka Pathirana [Fri, 5 Mar 2021 15:55:58 +0000 (16:55 +0100)]
usr_sbin/grml-setkeyboard: Fix a couple of shellcheck warnings

- SC2086: Double quote to prevent globbing and word splitting.
- Ignore SC1091: Not following: /etc/grml/script-functions was not specified as input (see shellcheck -x).
- SC2086: Double quote to prevent globbing and word splitting.
- SC2086: Double quote to prevent globbing and word splitting.
- SC2086: Double quote to prevent globbing and word splitting.
- SC2086: Double quote to prevent globbing and word splitting.
- Ignore SC1091: Not following: /etc/sysconfig/keyboard was not specified as input (see shellcheck -x).
- Ignore SC1010: Use semicolon or linefeed before 'fi' (or quote to make it literal).
- Ignore SC1091: Not following: /etc/grml/language-functions was not specified as input (see shellcheck -x).

2 years agousr_sbin/grml-iptstate: Fix a couple of shellcheck warnings
Darshaka Pathirana [Fri, 5 Mar 2021 15:33:44 +0000 (16:33 +0100)]
usr_sbin/grml-iptstate: Fix a couple of shellcheck warnings

- Ignore SC1091: Not following: /etc/grml/script-functions was not specified as input (see shellcheck -x).
- Ignore SC1091: Not following: /etc/grml/lsb-functions was not specified as input (see shellcheck -x).
- SC2162: read without -r will mangle backslashes.
- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.

2 years agousr_sbin/grml-hostname: Fix a couple of shellcheck warnings
Darshaka Pathirana [Fri, 5 Mar 2021 15:27:22 +0000 (16:27 +0100)]
usr_sbin/grml-hostname: Fix a couple of shellcheck warnings

- Ignore SC1091: Not following: /etc/grml/script-functions was not specified as input (see shellcheck -x).
- SC1117: Backslash is literal in "\n". Prefer explicit escaping: "\\n".
- SC1117: Backslash is literal in "\n". Prefer explicit escaping: "\\n".
- SC2086: Double quote to prevent globbing and word splitting.
- Ignore SC1117: Backslash is literal in "\(". Prefer explicit escaping: "\\(".
- Ignore SC1117: Backslash is literal in "\s". Prefer explicit escaping: "\\s".
- Ignore SC1117: Backslash is literal in "\)". Prefer explicit escaping: "\\)".
- Ignore SC1117: Backslash is literal in "\1". Prefer explicit escaping: "\\1".
- Ignore SC1117: Backslash is literal in "\(". Prefer explicit escaping: "\\(".
- Ignore SC1117: Backslash is literal in "\s". Prefer explicit escaping: "\\s".
- Ignore SC1117: Backslash is literal in "\)". Prefer explicit escaping: "\\)".
- Ignore SC1117: Backslash is literal in "\1". Prefer explicit escaping: "\\1".
- SC2046: Quote this to prevent word splitting.

2 years agousr_sbin/grml-config-root: Fix a couple of shellcheck warnings
Darshaka Pathirana [Fri, 5 Mar 2021 15:07:46 +0000 (16:07 +0100)]
usr_sbin/grml-config-root: Fix a couple of shellcheck warnings

- SC2006: Use $(..) instead of legacy `..`.
- SC2230: which is non-standard. Use builtin 'command -v' instead.
- SC2086: Double quote to prevent globbing and word splitting.

2 years agousr_sbin/grml-chroot: Fix a couple of shellcheck warnings
Darshaka Pathirana [Fri, 5 Mar 2021 14:52:36 +0000 (15:52 +0100)]
usr_sbin/grml-chroot: Fix a couple of shellcheck warnings

- SC2086: Double quote to prevent globbing and word splitting.
- SC2145: Argument mixes string and array. Use * or separate argument.
- SC2086: Double quote to prevent globbing and word splitting.
- SC2155: Declare and assign separately to avoid masking return values.
- SC2086: Double quote to prevent globbing and word splitting.
- SC2004: $/${} is unnecessary on arithmetic variables.
- SC2230: which is non-standard. Use builtin 'command -v' instead.
- SC2236: Use -n instead of ! -z.

2 years agousr_sbin/grml2ram: Fix a couple of shellcheck warnings
Darshaka Pathirana [Fri, 5 Mar 2021 14:37:36 +0000 (15:37 +0100)]
usr_sbin/grml2ram: Fix a couple of shellcheck warnings

- Ignore SC1091: Not following: /etc/grml/lsb-functions was not specified as input (see shellcheck -x).
- Ignore SC1091: Not following: /etc/grml/script-functions was not specified as input (see shellcheck -x).
- Set interpreter to /bin/bash because of SC2039: In POSIX sh, 'local' is undefined.
- SC2086: Double quote to prevent globbing and word splitting.
- SC2061: Quote the parameter to -name so the shell won't interpret it.
- SC2086: Double quote to prevent globbing and word splitting.
- SC2086: Double quote to prevent globbing and word splitting.
- SC2015: Note that A && B || C is not if-then-else. C may run when A is true.

2 years agousr_sbin/dirvish-setup: Fix some shellcheck warnings
Darshaka Pathirana [Thu, 11 Feb 2021 09:33:25 +0000 (10:33 +0100)]
usr_sbin/dirvish-setup: Fix some shellcheck warnings

- Ignore SC1091: Not following: /etc/grml/script-functions was not specified as input (see shellcheck -x).
- Ignore SC1091: Not following: /etc/grml/lsb-functions was not specified as input (see shellcheck -x).
- SC2046: Quote this to prevent word splitting.
- SC2006: Use $(..) instead of legacy `..`.
- Ignore SC1090: Can't follow non-constant source. Use a directive to specify location.
- SC2046: Quote this to prevent word splitting.
- SC2006: Use $(..) instead of legacy `..`.
- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
- SC2046: Quote this to prevent word splitting.
- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
- SC2086: Double quote to prevent globbing and word splitting.
- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.

2 years agousr_sbin/blacklist: Fix couple of shellcheck warnings:
Darshaka Pathirana [Thu, 11 Feb 2021 09:18:27 +0000 (10:18 +0100)]
usr_sbin/blacklist: Fix couple of shellcheck warnings:

- SC2086: Double quote to prevent globbing and word splitting.
- Ignore SC1091: Not following: /etc/grml/lsb-functions was not specified as input (see shellcheck -x).

2 years agousr_bin/soundtest: Fix a couple of shellcheck warnings
Darshaka Pathirana [Fri, 5 Feb 2021 14:15:50 +0000 (15:15 +0100)]
usr_bin/soundtest: Fix a couple of shellcheck warnings

- SC2046: Quote this to prevent word splitting.
- SC2230: which is non-standard. Use builtin 'command -v' instead.

2 years agousr_bin/random-hostname: Fix a couple of shellcheck warnings
Darshaka Pathirana [Fri, 5 Feb 2021 13:56:00 +0000 (14:56 +0100)]
usr_bin/random-hostname: Fix a couple of shellcheck warnings

- Ignore SC2034: hostnames appears unused. Verify use (or export if used externally).

While at it I rewrote the way how the random hostname is retrieved:

First find the line number 3 lines after the line which starts with "# EOF"
This is the line where the list of hostnames start.
This makes the script a bit more robust and avoids the hard coded start
line calculation ("num=$(( $num - 16 ))").

Then list all lines from there by excluding all empty commented out
lines and the last line (which start with "'").
Use "sort -R" to randomly sort the list and from there take the last line.

That way the confusing "randline" variable calculation is avoided.

2 years agousr_bin/iso-term: Fix a couple of shellcheck warnings
Darshaka Pathirana [Sun, 31 Jan 2021 09:03:59 +0000 (10:03 +0100)]
usr_bin/iso-term: Fix a couple of shellcheck warnings

- SC2006: Use $(..) instead of legacy `..`.
- SC2086: Double quote to prevent globbing and word splitting.
- SC2048: Use "$@" (with quotes) to prevent whitespace problems.
- SC2086: Double quote to prevent globbing and word splitting.

While at it also put the execution of x-terminal-emulator out of the
if-then-else clause to avoid duplicate code.

2 years agoMakefile: Do not shellcheck iimage
Darshaka Pathirana [Fri, 4 Dec 2020 11:55:47 +0000 (12:55 +0100)]
Makefile: Do not shellcheck iimage

iimage is not developed by the Grml-Team but causes a lot of shellcheck warnings.

While at it also ignore SC1117 for all scripts because
the check has been retired in shellcheck v0.5+.

2 years agousr_bin/grml-resolution: Fix a couple of shellscript warnings
Darshaka Pathirana [Fri, 4 Dec 2020 11:22:58 +0000 (12:22 +0100)]
usr_bin/grml-resolution: Fix a couple of shellscript warnings

- Ignore SC2086: dialog needs $STRING to be splitted, so that the values
  are listed in the menu
- SC2120: bailout references arguments, but none are ever passed
- Ignore SC2015: Note that A && B || C is not if-then-else.
  C may run when A is true

2 years agousr_bin/grml-lock: Fix a couple of shellcheck warnings
Darshaka Pathirana [Fri, 4 Dec 2020 11:03:40 +0000 (12:03 +0100)]
usr_bin/grml-lock: Fix a couple of shellcheck warnings

- SC2086: Double quote to prevent globbing and word splitting.
- Ignore SC1091
- SC2230: which is non-standard. Use builtin 'command -v' instead
- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?

2 years agousr_bin/grml-lang: Fix a couple of shellcheck warnings
Darshaka Pathirana [Fri, 4 Dec 2020 10:49:12 +0000 (11:49 +0100)]
usr_bin/grml-lang: Fix a couple of shellcheck warnings

- SC2034: PN appears unused. Verify use (or export if used externally).
- SC2086: Double quote to prevent globbing and word splitting.
- Ignore SC1091: Not following: /etc/grml/language-functions was not specified as input (see shellcheck -x).

SC1117 was retired due to noise in koalaman/shellcheck@d8a32da07.

2 years agousr_bin/grml-exec-wrapper: Fix a couple of shellcheck warnings
Darshaka Pathirana [Fri, 4 Dec 2020 10:00:08 +0000 (11:00 +0100)]
usr_bin/grml-exec-wrapper: Fix a couple of shellcheck warnings

- SC2059: Don't use variables in the printf format string.
- SC2086: Double quote to prevent globbing and word splitting.
- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.

Please note that SC2059 causes SC1117 (Backslash is literal in "\n".
Prefer explicit escaping: "\\n") in shellcheck 0.5.0 an below.

This check was retired due to noise in koalaman/shellcheck@d8a32da07.

2 years agoAdd Code testing workflow
Darshaka Pathirana [Fri, 13 Nov 2020 15:43:40 +0000 (16:43 +0100)]
Add Code testing workflow

Implement code testing by running shellcheck against shell scripts,
flake8, isort + black against python scripts and spellintian against
man pages.

Codecheck can be executed via 'make codecheck'.

Spellcheck can be executed via 'make spellcheck'.

The Github Workflow is heavily inspired by the workflow of
sipwise/ngcpcfg make by @mika (Thx!).

'make help' is inspired by
https://www.thapaliya.com/en/writings/well-documented-makefiles/
by @suvash (Thx!)

2 years agoRelease new version 2.10.0 v2.10.0
Michael Prokop [Fri, 9 Jul 2021 07:16:28 +0000 (09:16 +0200)]
Release new version 2.10.0

2 years agoMerge remote-tracking branch 'origin/github/pr/12'
Michael Prokop [Fri, 18 Jun 2021 17:15:06 +0000 (19:15 +0200)]
Merge remote-tracking branch 'origin/github/pr/12'

2 years agogrml-chroot: support efivarfs in EFI environments
Michael Prokop [Wed, 9 Jun 2021 16:40:12 +0000 (18:40 +0200)]
grml-chroot: support efivarfs in EFI environments

CONFIG_EFI_VARS is no longer available since Debian kernel's git commit
20146398c4, and therefore efivars (the older interface handled from
within /sys) is gone with the kernel version shipped as of
Debian/bullseye (kernel >=5.10).  Only the newer efivarfs interface is
supported, this requires explicit mounting of /sys/firmware/efi/efivars
though.

Therefore, whenever /sys/firmware/efi/efivars is available, we are
running in EFI mode and might need EFI support also in the chroot.
Accordingly mount it then.

This is related to the corresponding change in grml-debootstrap:
https://github.com/grml/grml-debootstrap/pull/174

3 years agoRelease new version 2.9.1 v2.9.1
Michael Prokop [Sun, 19 Jul 2020 16:09:38 +0000 (18:09 +0200)]
Release new version 2.9.1

3 years agogrml-lock: drop gdialog usage and don't wrap text in zenity
Michael Prokop [Sun, 19 Jul 2020 15:54:57 +0000 (17:54 +0200)]
grml-lock: drop gdialog usage and don't wrap text in zenity

gdialog is a compatibility wrapper around zenity and encourages
users to switch to usage of zenity, let's follow this recommendation.

Older zenity versions (like 3.14.0) had a different wrapping
behavior than more current versions (like 3.30.0). To avoid
small dialogs with only one or two words on each line (which
is ugly and close to unreadable) let's avoid wrapping text.

While at it fix some minor issues reported by shellcheck.

This work was funded by Grml-Forensic.

3 years agogrml-info: drop support for deprecated gdialog and prefer zenity over Xdialog
Michael Prokop [Sun, 19 Jul 2020 15:53:57 +0000 (17:53 +0200)]
grml-info: drop support for deprecated gdialog and prefer zenity over Xdialog

gdialog is a wrapper around zenity and deprecated, so let's get rid of
it. Also prefer zenity over Xdialog, since the former is better looking.

5 years agoRelease new version 2.9.0 v2.9.0
Michael Prokop [Thu, 21 Mar 2019 11:26:05 +0000 (12:26 +0100)]
Release new version 2.9.0

5 years agogrml2ram: switch default mount point from /lib/live/mount/medium to /run/live/medium
Michael Prokop [Thu, 21 Mar 2019 09:12:56 +0000 (10:12 +0100)]
grml2ram: switch default mount point from /lib/live/mount/medium to /run/live/medium

In commit 0d878d3a679 of live-boot(-grml)
("Simplify mount point handling by using /run/live instead of /lib/live/mount")
the mountpath of /lib/live/mount/medium was moved towards /run/live/medium.

Commit c6a17c7b41b of live-boot(-grml) provides a backward compatibility
rbind mount, but occasionally there seems to be a regression somewhere
during boot (see https://github.com/grml/live-boot-grml/issues/10), and
the rbind mount will be deprecated and removed before the bullseye
(Debian 11) release.

Layout changes over time:

* /cdrom for old linuxrc approach
* /live/image for initramfs layout until December 2012
* /lib/live/mount/medium for initramfs layout since December 2012
* /run/live/medium for initramfs layout since December 2018

Drop support for everything but /run/live/medium and
/lib/live/mount/medium, while at it.

5 years agoRelease new version 2.8.4 v2.8.4
Michael Prokop [Fri, 18 Jan 2019 13:22:28 +0000 (14:22 +0100)]
Release new version 2.8.4

5 years agoFix some further typos
Michael Prokop [Fri, 18 Jan 2019 13:20:00 +0000 (14:20 +0100)]
Fix some further typos

s/unuseable/unusable/
s/accessable/accessible/
s/Ressources/Resources/
s/funtions/functions/

5 years agogrml-setkeyboard + grml-setkeyboard{,.8}: fix typos
Michael Prokop [Fri, 18 Jan 2019 13:17:08 +0000 (14:17 +0100)]
grml-setkeyboard + grml-setkeyboard{,.8}: fix typos

s/temporarly/temporarily/
s/existance/existence/

Thanks lintian :)

5 years agoBump Standards-Version to 4.3.0
Michael Prokop [Fri, 18 Jan 2019 13:15:20 +0000 (14:15 +0100)]
Bump Standards-Version to 4.3.0

5 years agogrml-chroot: bind-mount /run/udev in target system as workaround for lvm2 issue ...
Michael Prokop [Fri, 18 Jan 2019 13:13:47 +0000 (14:13 +0100)]
grml-chroot: bind-mount /run/udev in target system as workaround for lvm2 issue #918590

Anything related to LVM tools takes ages with lvm 2.03.02-1 if /run/udev
isn't available in the target system, causing messages like:

| WARNING: Device /dev/[...] not initialized in udev database even after waiting 10000000 microseconds.

This /run/udev bind-mount is a workaround required for Debian/buster's
lvm2, at least until #918590 is resolved.

5 years agoRelease new version 2.8.3 v2.8.3
Michael Prokop [Sun, 30 Dec 2018 11:17:28 +0000 (12:17 +0100)]
Release new version 2.8.3

5 years agogrml-lang: use /etc/default/keyboard instead of /etc/sysconfig/keyboard
Michael Prokop [Sun, 30 Dec 2018 11:10:50 +0000 (12:10 +0100)]
grml-lang: use /etc/default/keyboard instead of /etc/sysconfig/keyboard

For proper font handling we switched to usage of console-setup and
keyboard-configuration packages. We adjusted grml-live and
grml-autoconfig to use /etc/default/keyboard instead of
/etc/sysconfig/keyboard. To better handle this also within grml-lang
itself, switch to usage of /etc/default/keyboard.

FTR, this is not the final and bullet-proof solution yet, but meant to
be fix the main issues (e.g. booting with Grml defaults, then pressing
'd' for german keyboard within grml-quickconfig and then starting X via
'x' within grml-quickoconfig), using a minimal approach.

Initial work addressing https://github.com/grml/grml/issues/115

5 years agoRelease new version 2.8.2 v2.8.2
Michael Prokop [Fri, 14 Dec 2018 10:38:19 +0000 (11:38 +0100)]
Release new version 2.8.2

5 years agogrml-chroot: iff /proc/cmdline exists don't try to mount again
Michael Prokop [Fri, 14 Dec 2018 08:37:33 +0000 (09:37 +0100)]
grml-chroot: iff /proc/cmdline exists don't try to mount again

There's no point in mounting /proc, /sys, /dev + /dev/pts
once again if it's mounted already. The easiest and cheapest
way to detect this is looking for file /proc/cmdline. If
/proc/cmdline exists assume that the chroot has the filesystems
mounted already.

Closes: https://github.com/grml/grml-scripts/issues/4

5 years agoRelease new version 2.8.1 v2.8.1
Michael Prokop [Thu, 15 Nov 2018 09:09:28 +0000 (10:09 +0100)]
Release new version 2.8.1

5 years agoDrop deprecated directories /etc/grml + /etc/postfix
Michael Prokop [Thu, 15 Nov 2018 09:08:50 +0000 (10:08 +0100)]
Drop deprecated directories /etc/grml + /etc/postfix

We no longer ship any files in those directories,
so avoid shipping those empty directories.

5 years agoSwitch Homepage + Vcs-Browser headers from http to https
Michael Prokop [Thu, 15 Nov 2018 09:04:18 +0000 (10:04 +0100)]
Switch Homepage + Vcs-Browser headers from http to https

5 years agoBump Standards-Version to 4.2.1
Michael Prokop [Thu, 15 Nov 2018 09:04:12 +0000 (10:04 +0100)]
Bump Standards-Version to 4.2.1

5 years agogrml-lock: run physlock with `-u` option only if it's supported
Michael Prokop [Thu, 14 Jun 2018 16:05:52 +0000 (18:05 +0200)]
grml-lock: run physlock with `-u` option only if it's supported

Closes grml/grml#87
Thanks: maximebuy for the bugreport

5 years agoRelease new version 2.8.0 v2.8.0
Michael Prokop [Fri, 1 Jun 2018 15:00:52 +0000 (17:00 +0200)]
Release new version 2.8.0

5 years agoDrop reread_partition_table binary
Michael Prokop [Fri, 1 Jun 2018 14:59:48 +0000 (16:59 +0200)]
Drop reread_partition_table binary

Fails to build against recent fs.h versions:

| In file included from reread_partition_table.c:12:0:
| /usr/include/linux/fs.h:366:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__kernel_rwf_t'
|  typedef int __bitwise __kernel_rwf_t;
|                        ^~~~~~~~~~~~~~
| make[1]: *** [Makefile:24: reread_partition_table] Error 1

It's not worth any further work, partprobe(8) does the
job as well and is maintained.

5 years agoBump debian/compat to 10 and adjust Build-Depends for debhelper to v10
Michael Prokop [Fri, 1 Jun 2018 14:58:15 +0000 (16:58 +0200)]
Bump debian/compat to 10 and adjust Build-Depends for debhelper to v10

5 years agoBump Standards-Version to 4.1.4
Michael Prokop [Fri, 1 Jun 2018 14:57:51 +0000 (16:57 +0200)]
Bump Standards-Version to 4.1.4

5 years agorun_welcome: drop unicode hack
Michael Prokop [Fri, 1 Jun 2018 14:54:11 +0000 (16:54 +0200)]
run_welcome: drop unicode hack

The `umpkeys | loadkeys --unicode` recently triggers the following
error message during bootup:

| adding map 3 violates explicit keymap line

AFAICS this old hack is no longer needed, so let's try
without it.

Closes grml/grml#96

6 years agoRelease new version 2.7.3 v2.7.3
Michael Prokop [Fri, 16 Jun 2017 08:05:32 +0000 (10:05 +0200)]
Release new version 2.7.3

6 years agogrml-chroot: mount /dev/pts as devpts inside chroot
Michael Prokop [Wed, 10 May 2017 13:18:13 +0000 (15:18 +0200)]
grml-chroot: mount /dev/pts as devpts inside chroot

Fixes:

| E: Can not write log (Is /dev/pts mounted?) - posix_openpt (2: No such file or directory)

Closes grml/grml#53

6 years agoRevert "grml-chroot: mount /dev/pts as devpts inside chroot"
Michael Prokop [Fri, 16 Jun 2017 07:56:36 +0000 (09:56 +0200)]
Revert "grml-chroot: mount /dev/pts as devpts inside chroot"

This reverts commit f29c425ad79cbe31fca61397cbd3d97347f32cd7.

This is causing troubles under certain conditions which leave the
system in an unfixable state, so we need a different approach.

See grml/grml#53

6 years agoRelease new version 2.7.2 v2.7.2
Michael Prokop [Wed, 24 May 2017 07:17:20 +0000 (09:17 +0200)]
Release new version 2.7.2

6 years agonotifyd: fix typo in comment
Evgeni Golov [Fri, 16 Oct 2015 15:09:50 +0000 (17:09 +0200)]
notifyd: fix typo in comment

6 years agonotifyd: call aplay using subprocess.Popen + replace os.system with subprocess.call
Evgeni Golov [Fri, 16 Oct 2015 15:08:29 +0000 (17:08 +0200)]
notifyd: call aplay using subprocess.Popen + replace os.system with subprocess.call

Closes #2

6 years agoRelease new version 2.7.1 v2.7.1
Michael Prokop [Tue, 16 May 2017 13:13:00 +0000 (15:13 +0200)]
Release new version 2.7.1

6 years agogrml-chroot: mount /dev/pts as devpts inside chroot
Michael Prokop [Wed, 10 May 2017 13:53:35 +0000 (15:53 +0200)]
grml-chroot: mount /dev/pts as devpts inside chroot

Fixes:

| E: Can not write log (Is /dev/pts mounted?) - posix_openpt (2: No such file or directory)

Thanks: András Korn for proposing the --rbind/--recursive approach

7 years agoRelease new version 2.7.0 v2.7.0
Michael Prokop [Fri, 30 Dec 2016 23:19:32 +0000 (00:19 +0100)]
Release new version 2.7.0

7 years agoBump Standards-Version to 3.9.8
Michael Prokop [Fri, 30 Dec 2016 23:18:59 +0000 (00:18 +0100)]
Bump Standards-Version to 3.9.8

7 years agogrml-hostname: no longer rely on /etc/init.d/hostname.sh
Michael Prokop [Fri, 30 Dec 2016 23:17:49 +0000 (00:17 +0100)]
grml-hostname: no longer rely on /etc/init.d/hostname.sh

/etc/init.d/hostname.sh was shipped with the initscripts,
but it doesn't necessarily exist anymore nowadays.
So instead directly invoke `hostname` as the init script
does as well.

8 years agoRelease new version 2.6.1 v2.6.1
Michael Prokop [Wed, 6 Jan 2016 11:34:53 +0000 (12:34 +0100)]
Release new version 2.6.1

8 years agoAdd script run-journalctl + use /bin/sh for all run-* wrappers
Michael Prokop [Wed, 6 Jan 2016 11:31:45 +0000 (12:31 +0100)]
Add script run-journalctl + use /bin/sh for all run-* wrappers

The script run-journalctl is for usage on tty12 on Grml systems
which are powered by systemd and therefore provoding journalctl.

8 years agoRelease new version 2.6.0 v2.6.0
Michael Prokop [Wed, 8 Jul 2015 13:19:18 +0000 (15:19 +0200)]
Release new version 2.6.0

8 years agoRun wrap-and-sort on debian directory
Michael Prokop [Wed, 8 Jul 2015 13:19:01 +0000 (15:19 +0200)]
Run wrap-and-sort on debian directory

8 years agoBump Standards-Version to 3.9.6
Michael Prokop [Wed, 8 Jul 2015 13:18:47 +0000 (15:18 +0200)]
Bump Standards-Version to 3.9.6

8 years agogrml-lock: switch from vlock to physlock [Closes: issue1342]
Michael Prokop [Wed, 8 Jul 2015 13:17:21 +0000 (15:17 +0200)]
grml-lock: switch from vlock to physlock [Closes: issue1342]

Add physlock package to Recommends.

10 years agoRelease new version 2.5.2 v2.5.2
Michael Prokop [Sat, 19 Apr 2014 13:41:01 +0000 (15:41 +0200)]
Release new version 2.5.2

10 years agogrml-lang: support language settings for Italy
Michael Prokop [Fri, 18 Apr 2014 20:53:34 +0000 (22:53 +0200)]
grml-lang: support language settings for Italy

Thanks: Marco d'Itri <md@Linux.IT>

10 years agoRelease new version 2.5.1 v2.5.1
Michael Prokop [Fri, 7 Feb 2014 07:56:27 +0000 (08:56 +0100)]
Release new version 2.5.1

10 years agogrml-lock: fix typo (s/to/do/)
Michael Prokop [Fri, 7 Feb 2014 07:56:07 +0000 (08:56 +0100)]
grml-lock: fix typo (s/to/do/)

10 years agoRelease new version 2.5.0 v2.5.0
Michael Prokop [Wed, 5 Feb 2014 08:36:32 +0000 (09:36 +0100)]
Release new version 2.5.0

10 years agoBump Standards-Version to 3.9.5
Michael Prokop [Wed, 5 Feb 2014 08:36:15 +0000 (09:36 +0100)]
Bump Standards-Version to 3.9.5

10 years agoStatically compile grml-runtty to avoid dependency on unstable's libc
Michael Prokop [Wed, 5 Feb 2014 08:29:10 +0000 (09:29 +0100)]
Statically compile grml-runtty to avoid dependency on unstable's libc

It's annoying if grml-scripts can't be updated any longer on
systems based for example on Debian/wheezy, so let's get rid
of the dependency on libc.

Compiling requires -lcompat, otherwise fails with:

| undefined reference to `clearenv'

10 years agoRelease new version 2.4.1 v2.4.1
Michael Prokop [Fri, 13 Sep 2013 08:22:36 +0000 (10:22 +0200)]
Release new version 2.4.1

10 years agoRemove the script grml-config and set a symlink to grml-config-root
Markus Rekkenbeil [Fri, 13 Sep 2013 08:09:40 +0000 (10:09 +0200)]
Remove the script grml-config and set a symlink to grml-config-root

Signed-off-by: Markus Rekkenbeil <bionix@grml.org>
10 years agoFix: Erase all forgotten stuff from grml-config-user [Closes: issue1272]
Markus Rekkenbeil [Thu, 12 Sep 2013 18:40:37 +0000 (20:40 +0200)]
Fix: Erase all forgotten stuff from grml-config-user [Closes: issue1272]

Signed-off-by: Markus Rekkenbeil <bionix@grml.org>