mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-11-22 13:11:26 +00:00
desktop_login: correct ownership of home dir after touching it
Here we are creating ~/.config for a newly-created user with root ownership. We can't leave it that way, as commands run as the user account won't be able to change it, as they should be able to. So we need to change the ownership (and, just in case, fix SELinux contexts) afterwards. This was the real source of the problem we were seeing (the test failing early due to the gsettings command which should turn the screen background black failing). Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
de48d228af
commit
c9352592e2
@ -54,6 +54,8 @@ sub adduser {
|
|||||||
if ($desktop eq "gnome") {
|
if ($desktop eq "gnome") {
|
||||||
assert_script_run "mkdir /home/$login/.config";
|
assert_script_run "mkdir /home/$login/.config";
|
||||||
assert_script_run "echo 'yes' >> /home/$login/.config/gnome-initial-setup-done";
|
assert_script_run "echo 'yes' >> /home/$login/.config/gnome-initial-setup-done";
|
||||||
|
assert_script_run "chown -R $login.$login /home/$login/.config";
|
||||||
|
assert_script_run "restorecon -vr /home/$login/.config";
|
||||||
}
|
}
|
||||||
if ($args{termstop}) {
|
if ($args{termstop}) {
|
||||||
type_very_safely "exit\n";
|
type_very_safely "exit\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user