This commit is contained in:
2026-02-03 23:26:43 +08:00
parent 2270200b33
commit 1933eee16b
2 changed files with 120 additions and 5 deletions

View File

@@ -443,6 +443,9 @@ namespace CMLeonOS
case "user":
ProcessUserCommand(args);
break;
case "hostname":
ProcessHostnameCommand(args);
break;
case "cpass":
userSystem.ChangePassword();
break;
@@ -1441,6 +1444,17 @@ namespace CMLeonOS
return $"{size:F2} {units[unitIndex]}";
}
private void ProcessHostnameCommand(string args)
{
if (string.IsNullOrEmpty(args))
{
ShowError("Usage: hostname <new_hostname>");
return;
}
userSystem.ProcessHostnameCommand(args);
}
private void ProcessUserCommand(string args)
{
if (string.IsNullOrEmpty(args))