remove alternates - add ccemux peripherals upon system startup
This commit is contained in:
16
ccemux/bin/emustartup.moon
Normal file
16
ccemux/bin/emustartup.moon
Normal file
@@ -0,0 +1,16 @@
|
||||
import ccemux from _G
|
||||
import fs from _G
|
||||
import peripheral from _G
|
||||
import unserialize from _G.textutils
|
||||
|
||||
CONFIG = 'usr/config/ccemux'
|
||||
|
||||
if ccemux and fs.exists CONFIG
|
||||
f = fs.open(CONFIG, 'r')
|
||||
c = unserialize(f.readAll())
|
||||
f.close()
|
||||
|
||||
for k,v in pairs c
|
||||
if not peripheral.getType(k)
|
||||
ccemux.attach(k, v.type, v.args)
|
||||
print k
|
||||
Reference in New Issue
Block a user