Added full name / Support for libreschool-pxeserver
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details

This commit is contained in:
Paolo Asperti 2020-03-30 17:30:42 +02:00
parent 04b0d740c6
commit a7051f1cb8
Signed by: paspo
GPG Key ID: 06D46905D19D5182
4 changed files with 32 additions and 1 deletions

View File

@ -1,6 +1,6 @@
Summary: LibreSchool Client Local Admin Users
Name: libreschool-adminusers
Version: 1.0.1
Version: 1.0.2
Release: 1.ns7
License: GPL
BuildArch: noarch
@ -36,6 +36,7 @@ echo "%doc COPYING" >> %{name}-%{version}-%{release}
%post
/etc/e-smith/events/actions/initialize-default-databases
/sbin/e-smith/expand-template /etc/ansible/reconfigure_clients.yml
/sbin/e-smith/expand-template /srv/ipxe/default_preseed.txt
%postun
#if [ "$1" = 1 ]; then
@ -45,9 +46,14 @@ if [ "$1" = 0 ]; then
#uninstallation
/sbin/e-smith/db configuration delete adminusers
/sbin/e-smith/expand-template /etc/ansible/reconfigure_clients.yml
/sbin/e-smith/expand-template /srv/ipxe/default_preseed.txt
fi
%changelog
* Mon Mar 30 2020 Paolo Asperti <paolo@asperti.com> - 1.0.2-1.ns7
- Added full name
- Support for libreschool-pxeserver
* Sun Mar 8 2020 Paolo Asperti <paolo@asperti.com> - 1.0.1-1.ns7
- First round of fixes

View File

@ -4,6 +4,7 @@
user:
name: "{{ esmith.adminusers.username }}"
groups: adm,cdrom,sudo,dip,plugdev,lpadmin,sambashare
comment: "{{ esmith.adminusers.fullname }}"
append: yes
state: present

View File

@ -0,0 +1 @@
LibreSchool Administrator

View File

@ -0,0 +1,23 @@
#
# 20DefaultUserOverride
#
# This overrides the default admin user of a fresh installation
{
$userfullname = ${'adminusers'}{fullname} || 'LibreSchool Administrator';
$username = ${'adminusers'}{username} || 'libreschool';
$password = ${'adminusers'}{password} || '';
if ( $password ne '' ) {
$OUT .= <<EOF
d-i passwd/user-fullname string $userfullname
d-i passwd/username string $username
d-i passwd/user-password password $password
d-i passwd/user-password-again password $password
d-i user-setup/allow-password-weak boolean true
EOF
} else {
$OUT .= "";
}
}