Skip to content

Commit

Permalink
Better Count and lists Installed kernels
Browse files Browse the repository at this point in the history
  • Loading branch information
eloaders committed Jul 24, 2014
1 parent f89cd7f commit 6944d34
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions I-Nex/i-nex/.src/Finfosys.class
Original file line number Diff line number Diff line change
Expand Up @@ -208,16 +208,18 @@ Public Sub Form_Open()
ComboBox1.List = Dir("/sys/devices/system/cpu/", "cpu[0-9]")
'Locate kernels
MaxCount = 0
Try data = Shell "ls /boot | grep 'vmlinuz*'" For Input

While Not Eof(data)
Line Input #data, sLine
MaxCount += 1
ListBox1.Add(sLine, MaxCount)
Wend
' Try data = Shell "ls /boot | grep 'vmlinuz*'" For Input
'
' While Not Eof(data)
' Line Input #data, sLine
' MaxCount += 1
' ListBox1.Add(sLine, MaxCount)
' Wend
'
' Try Close #data

Try Close #data
Label228.Text = "Installed Kernels: " & CString(MaxCount)
ListBox1.List = Dir("/boot/", "vmlinuz*")
Label228.Text = "Installed Kernels: " & CString(Dir("/boot/", "vmlinuz*").Count)
'End of locate kernels
If User.Name = "root" Then
Message.Error(("Running as root is not allowed!\n " & User.Home & ""))
Expand Down

0 comments on commit 6944d34

Please sign in to comment.