mirror of
https://github.com/Leonmmcoset/CMLeonOS.git
synced 2026-03-03 15:30:27 +00:00
hostname
This commit is contained in:
14
Shell.cs
14
Shell.cs
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user