Skip to content

Commit 79d3979

Browse files
committed
Move readonly warning to its own txt file
1 parent 0293236 commit 79d3979

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

resources/readonly_warning.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
***************************************************************************
2+
* Users filesytem is not defined, I will use a temporal filesytem instead *
3+
* *
4+
* ALL YOUR CHANGES WILL BE LOST IF YOU DON'T SAVE IN OTHER PLACE *
5+
* *
6+
* You can find info about how to create a NodeOS users filesystem at *
7+
* *
8+
* https://github.com/NodeOS/NodeOS *
9+
***************************************************************************

server.js

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -516,19 +516,12 @@ function mountUsersFS(cmdline)
516516

517517
// Users filesystem is not defined, launch a Node.js REPL
518518
else
519-
{
520-
console.warn('*************************************************************')
521-
console.warn('* Users filesytem is not defined, will use a tmpfs instead. *')
522-
console.warn('* *')
523-
console.warn('* ALL YOUR CHANGES WILL BE LOST IF NOT SAVED IN OTHER PLACE *')
524-
console.warn('* *')
525-
console.warn('* You can find info about how to use an users filesystem at *')
526-
console.warn('* *')
527-
console.warn('* https://github.com/NodeOS/NodeOS *')
528-
console.warn('*************************************************************')
519+
fs.readFile('resources/readonly_warning.txt', 'utf8', function(error, data)
520+
{
521+
if(!error) console.warn(data)
529522

530-
utils.startRepl('NodeOS-mount-filesystems')
531-
}
523+
utils.startRepl('NodeOS-mount-filesystems')
524+
})
532525
}
533526

534527

0 commit comments

Comments
 (0)