All views expressed on this site are my own. They do not necessarily reflect
those of the Parish of Bursledon, the Diocese of Winchester or the Church of
England. As such, I do not expect them all to be popular but you, the reader,
can certainly expect them to be honest.
Haven't mentioned this for a few days, I've not been ignoring it. I chatted
with Carlos earlier in the week on
#GST about it, and basically we
both think that my code should work. But it doesn't. If anyone can tell
me how the following doesn't work, when
$gst_dist == "suse-9.0",
I'd love to know:
%login_defs_prop_map = ();
# For SuSE, we need to use SYSTEM_GID_MIN, not GID_MIN
if ($gst_dist =~ /^suse/)
{
@login_defs_prop_array =
(
"QMAIL_DIR" , "qmail_dir",
"MAIL_DIR" , "mailbox_dir",
"MAIL_FILE" , "mailbox_file",
"PASS_MAX_DAYS" , "pwd_maxdays",
"PASS_MIN_DAYS" , "pwd_mindays",
"PASS_MIN_LEN" , "pwd_min_length",
"PASS_WARN_AGE" , "pwd_warndays",
"UID_MIN" , "umin",
"UID_MAX" , "umax",
"SYSTEM_GID_MIN" , "gmin",
"GID_MAX" , "gmax",
"USERDEL_CMD" , "del_user_additional_command",
"CREATE_HOME" , "create_home",
"", "");
}
else
{
@login_defs_prop_array =
(
"QMAIL_DIR" , "qmail_dir",
"MAIL_DIR" , "mailbox_dir",
"MAIL_FILE" , "mailbox_file",
"PASS_MAX_DAYS" , "pwd_maxdays",
"PASS_MIN_DAYS" , "pwd_mindays",
"PASS_MIN_LEN" , "pwd_min_length",
"PASS_WARN_AGE" , "pwd_warndays",
"UID_MIN" , "umin",
"UID_MAX" , "umax",
"GID_MIN" , "gmin",
"GID_MAX" , "gmax",
"USERDEL_CMD" , "del_user_additional_command",
"CREATE_HOME" , "create_home",
"", "");
}
for ($i = 0; $login_defs_prop_array[$i] ne ""; $i += 2)
{
$login_defs_prop_map {$login_defs_prop_array[$i]} = $login_defs_prop_array[$i + 1];
$login_defs_prop_map {$login_defs_prop_array[$i + 1]} = $login_defs_prop_array[$i];
}
%profiles_prop_map = ();
# For SuSE, we need to use SYSTEM_GID_MIN, not GID_MIN
if ($gst_dist =~ /^suse/)
{
@profiles_prop_array =
(
"NAME" , "name",
"COMMENT", "comment",
"LOGINDEFS", "login_defs",
"HOME_PREFFIX", "home_prefix",
"SHELL", "shell",
"GROUP", "group",
"SKEL_DIR", "skel_dir",
"QMAIL_DIR" , "qmail_dir",
"MAIL_DIR" , "mailbox_dir",
"MAIL_FILE" , "mailbox_file",
"PASS_RANDOM", "pwd_random",
"PASS_MAX_DAYS" , "pwd_maxdays",
"PASS_MIN_DAYS" , "pwd_mindays",
"PASS_MIN_LEN" , "pwd_min_length",
"PASS_WARN_AGE" , "pwd_warndays",
"UID_MIN" , "umin",
"UID_MAX" , "umax",
"SYSTEM_GID_MIN" , "gmin",
"GID_MAX" , "gmax",
"USERDEL_CMD" , "del_user_additional_command",
"CREATE_HOME" , "create_home",
"", "");
}
else
{
@profiles_prop_array =
(
"NAME" , "name",
"COMMENT", "comment",
"LOGINDEFS", "login_defs",
"HOME_PREFFIX", "home_prefix",
"SHELL", "shell",
"GROUP", "group",
"SKEL_DIR", "skel_dir",
"QMAIL_DIR" , "qmail_dir",
"MAIL_DIR" , "mailbox_dir",
"MAIL_FILE" , "mailbox_file",
"PASS_RANDOM", "pwd_random",
"PASS_MAX_DAYS" , "pwd_maxdays",
"PASS_MIN_DAYS" , "pwd_mindays",
"PASS_MIN_LEN" , "pwd_min_length",
"PASS_WARN_AGE" , "pwd_warndays",
"UID_MIN" , "umin",
"UID_MAX" , "umax",
"SYSTEM_GID_MIN" , "gmin",
"GID_MAX" , "gmax",
"USERDEL_CMD" , "del_user_additional_command",
"CREATE_HOME" , "create_home",
"", "");
}
for ($i = 0; $profiles_prop_array[$i] ne ""; $i += 2)
{
$profiles_prop_map {$profiles_prop_array[$i]} = $profiles_prop_array[$i + 1];
$profiles_prop_map {$profiles_prop_array[$i + 1]} = $profiles_prop_array[$i];
}