Ranger15

test openos

Jun 17th, 2021
627
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local component = require("component")
  2.  
  3. local installInto = {}
  4.  
  5. function installInto.HDD()
  6.   for address in component.list('filesystem') do
  7.     local dev = component.proxy(address)
  8.     local lab = dev.getLabel()
  9.     if lab~='openos' and lab~='OpenOS' and lab~='tmpfs' then
  10.       targetDrive = dev.address:sub(1,3)
  11.     elseif lab=='openos' then
  12.       fromDrive = dev.address:sub(1,3)
  13.     end
  14.   end
  15.  
  16.   fullString = 'yes|install --from=\'' .. fromDrive .. '\' --to=\'' .. targetDrive .. '\' --noreboot'
  17.   os.execute(fullString)
  18. end
  19.  
  20. return installInto
RAW Paste Data