mirror of
https://github.com/EverythingWindows/ShiftOS-TheRevival-Old.git
synced 2025-01-22 18:02:16 +00:00
Superuser test
This commit is contained in:
parent
da197f3153
commit
8fda39ba31
2 changed files with 14 additions and 4 deletions
|
@ -26,7 +26,7 @@
|
|||
'0 = OSVersion (default : dependant)
|
||||
'
|
||||
'OnceInfo Strings:
|
||||
'0 = IsRoot? (0.1) (default : 0)
|
||||
'0 = IsRoot? (0.1) (default : No)
|
||||
'
|
||||
'ComputerInfo Strings:
|
||||
'0 = Computer Name (0.1) (default : shiftos)
|
||||
|
|
|
@ -23,13 +23,13 @@
|
|||
|
||||
Public Sub PrintPrompt()
|
||||
If TextBox1.Text = Nothing Then
|
||||
If Strings.OnceInfo(0) = "No" Then
|
||||
If Strings.OnceInfo(0) = "Yes" Then
|
||||
TextBox1.Text = "root@" & Strings.ComputerInfo(0) & " #> "
|
||||
Else
|
||||
TextBox1.Text = Strings.ComputerInfo(1) & "@" & Strings.ComputerInfo(0) & " $> "
|
||||
End If
|
||||
Else
|
||||
If Strings.OnceInfo(0) = "No" Then
|
||||
If Strings.OnceInfo(0) = "Yes" Then
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & "root@" & Strings.ComputerInfo(0) & " #> "
|
||||
Else
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & Strings.ComputerInfo(1) & "@" & Strings.ComputerInfo(0) & " $> "
|
||||
|
@ -38,7 +38,7 @@
|
|||
End Sub
|
||||
|
||||
Public Sub AssignPrompt()
|
||||
If Strings.OnceInfo(0) = "No" Then
|
||||
If Strings.OnceInfo(0) = "Yes" Then
|
||||
DefaultPrompt = "root@" & Strings.ComputerInfo(0) & " #> "
|
||||
Else
|
||||
DefaultPrompt = Strings.ComputerInfo(1) & "@" & Strings.ComputerInfo(0) & " $> "
|
||||
|
@ -90,6 +90,7 @@
|
|||
If Strings.AvailableFeature(0) = 1 Then
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & "MAN Shows a command, its corresponding action, and its example usage"
|
||||
End If
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & "SU Runs terminal as super user"
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & "SHUTDOWN Terminate ShiftOS session"
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & "VER Printing current version of ShiftOS TheRevival"
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine
|
||||
|
@ -99,6 +100,15 @@
|
|||
TextBox1.Text = TextBox1.Text & Environment.NewLine & "ShiftOS TheRevival version 0.1.1"
|
||||
AdvancedCommand = False
|
||||
BadCommand = False
|
||||
Case "su"
|
||||
If Strings.OnceInfo(0) = "Yes" Then
|
||||
TextBox1.Text = TextBox1.Text & Environment.NewLine & "You already in root mode!"
|
||||
Else
|
||||
Strings.OnceInfo(0) = "Yes"
|
||||
AssignPrompt()
|
||||
End If
|
||||
AdvancedCommand = False
|
||||
BadCommand = False
|
||||
Case "shutdown", "shut down"
|
||||
ShiftOSMenu.Show()
|
||||
Close()
|
||||
|
|
Loading…
Reference in a new issue