Commit Graph

3 Commits

Author SHA1 Message Date
Petr Lautrbach
28f9992604 Use /bin/bash instead of /bin/sh
Fixes:

$ shellcheck -S warning selinux-autorelabel-generator.sh

In selinux-autorelabel-generator.sh line 22:
    source /etc/selinux/config
    ^------------------------^ SC3046 (warning): In POSIX sh, 'source' in place of '.' is undefined.

For more information:
  https://www.shellcheck.net/wiki/SC3046 -- In POSIX sh, 'source' in place of...

https://bugzilla.redhat.com/show_bug.cgi?id=2210593
2023-05-30 10:28:15 +00:00
Petr Lautrbach
0d980e2bff Use StandardInput=tty when AUTORELABEL=0
selinux-autorelabel service can be configured to drop to a shell to allow
administrator to manually relabel a filesystem, see selinux_config(5). In
this case, the service needs to have a tty attached to stdin. Given that
tty should not be attached to the service by default, see
https://bugzilla.redhat.com/show_bug.cgi?id=1634661 , the
selinux-autorelabel-generator.sh will configure the service to attach
tty only if AUTORELABEL=0

Resolves: rhbz#2165508
2023-02-08 11:27:20 +01:00
Richard W.M. Jones
183d121f7f Use generator approach to fix autorelabel.
See:
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/CHCEGB2RUPHFCE4FVGIRO3CJYGNS75T7/
2016-07-20 22:31:07 +02:00