127 |
} |
} |
128 |
|
|
129 |
package Libconf::Glueconf::Hosts; |
package Libconf::Glueconf::Hosts; |
130 |
|
use strict; |
131 |
|
use Libconf::Types; |
132 |
|
|
133 |
$data_synopsis ||= {}; |
$data_synopsis ||= {}; |
134 |
$data_synopsis->{default_version} = |
$data_synopsis->{default_version} = |
135 |
{ |
{ |
136 |
description => { |
description => { |
137 |
$Libconf::Types::IP_REGEXP => { |
$Libconf::Types::IP4_REGEXP => { |
138 |
# Start the session as the user specified here. |
canonical_hostname => { type => 'HOSTNAME' }, |
139 |
# This setting is mandatory. If omitted, autologin will not run. |
aliases => { type => 'HOSTNAME' }, |
140 |
# If autologin was compiled with --enable-paranoid, autologin will |
}, |
141 |
# not run if the user specified has UID or GID 0. |
} |
|
USER => { type => 'STRING', |
|
|
values => sub { |
|
|
require Libconf::System::Users; |
|
|
my $sys_users = new Libconf::System::Users; |
|
|
[$sys_users->getUsersList(sub { $_[0]->{UID} >= 500 })]; |
|
|
} |
|
|
}, |
|
|
|
|
|
# The script or program listed here will be executed as the user |
|
|
# specified above. |
|
|
# If this setting is omitted, /usr/X11R6/bin/startx will be used. |
|
|
EXEC => { type => 'COMMAND' }, #[script or program] |
|
|
|
|
|
# You can use this setting to turn off autologin even if it is |
|
|
# installed and the config file exists and is considered safe. |
|
|
# If this setting is omitted, "yes" is assumed. |
|
|
AUTOLOGIN => { type => 'BOOLEAN' }, |
|
|
}, |
|
142 |
}; |
}; |
143 |
|
|
144 |
1; |
1; |