ChibraxOS 2
Changes: - kernel 6.0.2 - Broken init scripts - Switch to bun for better peroformance an easier ffi - Removed grup - Efi support without graphics (at least graphics werent tested) - Suppression de toutes les dépendance non libc - new splash - broken audio - typescript support - ls rewritten to be more reliable
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
//@ts-check
|
||||
const ip = require('../../core/ip.js.bak')
|
||||
const fs = require('fs')
|
||||
const { exit } = require('process')
|
||||
|
||||
function usage() {
|
||||
console.log('invalid syntax')
|
||||
console.log('ifup [interface name]')
|
||||
}
|
||||
|
||||
if ( process.argv.length !== 4 ){
|
||||
usage()
|
||||
exit(1)
|
||||
}
|
||||
|
||||
if ( !fs.existsSync('/sys/class/net/' + process.argv[3]) ) {
|
||||
console.log("Interface not found")
|
||||
exit(1)
|
||||
}
|
||||
|
||||
let flags = ip.getFlags(process.argv[3])
|
||||
|
||||
flags |= ip.flags.IFF_UP
|
||||
|
||||
ip.setFlags(process.argv[3], flags)
|
||||
Reference in New Issue
Block a user