aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEverythingWindows <[email protected]>2022-11-02 18:09:01 +0700
committerEverythingWindows <[email protected]>2022-11-02 18:09:01 +0700
commit8fda39ba3124a6b48c39063a1a96a9d5ae0a02b0 (patch)
tree83daac22be46d93a5d47015699e42b3dac0674c5
parentda197f3153b424203116cdb9617d03cabad1dd01 (diff)
downloadshiftos-therevival-old-8fda39ba3124a6b48c39063a1a96a9d5ae0a02b0.tar.gz
shiftos-therevival-old-8fda39ba3124a6b48c39063a1a96a9d5ae0a02b0.tar.bz2
shiftos-therevival-old-8fda39ba3124a6b48c39063a1a96a9d5ae0a02b0.zip
Superuser test
-rw-r--r--ShiftOS-TheRevival/MainForms/Strings.vb2
-rw-r--r--ShiftOS-TheRevival/MainForms/Terminal.vb16
2 files changed, 14 insertions, 4 deletions
diff --git a/ShiftOS-TheRevival/MainForms/Strings.vb b/ShiftOS-TheRevival/MainForms/Strings.vb
index 6326be6..5a84488 100644
--- a/ShiftOS-TheRevival/MainForms/Strings.vb
+++ b/ShiftOS-TheRevival/MainForms/Strings.vb
@@ -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)
diff --git a/ShiftOS-TheRevival/MainForms/Terminal.vb b/ShiftOS-TheRevival/MainForms/Terminal.vb
index fdb6ef4..bc8262b 100644
--- a/ShiftOS-TheRevival/MainForms/Terminal.vb
+++ b/ShiftOS-TheRevival/MainForms/Terminal.vb
@@ -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()