Re: Mandatory user spoke

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

You should be able to modify the UserSpoke in a similar way how the Source spoke is working:

https://github.com/rhinstaller/anaconda/blob/master/pyanaconda/ui/gui/spokes/installation_source.py#L576

You need to have mandatory and ready properties implemented.

Also if you want to use this only for Initial Setup you can use environment flag in a similar way how we are using it in the Network spoke. This will enable you to run the code only inside of Initial Setup and not in Anaconda.

https://github.com/rhinstaller/anaconda/blob/master/pyanaconda/ui/gui/spokes/network.py#L1530

You just replace the ANACONDA_ENVIRON by this:

https://github.com/rhinstaller/anaconda/blob/master/pyanaconda/constants.py#L135 (Firstboot is name of InitialSetup, historically reasons)


You can of course hide this spoke and use your addon spoke by implementing this property:

https://github.com/rhinstaller/anaconda/blob/master/pyanaconda/ui/gui/spokes/custom_storage.py#L211

or by changing configuration file /etc/sysconfig/anaconda, you should be able to find it in Anaconda documentation.

I hope this will help you.

Jirka


On Wed, 2017-08-30 at 23:18 +0300, Cristian Stan wrote:
Hello all,

I have an issue I could not fix by myself so far:

We have a custom Fedora build. After the base Anaconda install, Initial Setup runs with two spokes, one with a custom add-on, and the user creation spoke.
Our issues are with the default user creation spoke; we should both enable by default the 'Make this user administrator' checkbox and make the user creation mandatory, so that the setup may not be exited without creating a user. I've even tried disabling altogether the user creation spoke to be able to run my own user creation add-on. I've had no luck so far.


What I've tried until now:

To enable by default 'Make this user administrator' I have:

* modified the 'c_admin' object in user.glade to enable it by default
* tested separately the 'c_admin' user.glade object in Glade Interface Designer (it works, as expected)
* tested the 'c_admin' modification on 'c_usepassword' (to isolate the issue; the same setting for one object does not work for the other)

To make the original user creation spoke in Initial Setup mandatory I have:

* modified the '_checkUsername' method from user.py, class 'UserSpoke' (Anaconda sources)

All the modifications were performed after Anaconda's first stage and before running Initial Setup.



Do you have any ideas about this and how should I proceed?


Thank you, your help is greatly appreciated!

Cristian Stan

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux