typescript-virtual-container 1.3.3 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/builds/self-standalone.js +20 -20
- package/builds/self-standalone.js.map +3 -3
- package/builds/standalone-wo-sftp.js +1 -1
- package/builds/standalone-wo-sftp.js.map +3 -3
- package/builds/standalone.js +1 -1
- package/builds/standalone.js.map +3 -3
- package/dist/VirtualUserManager/index.js +5 -8
- package/package.json +1 -1
- package/src/VirtualUserManager/index.ts +9 -9
|
@@ -65,15 +65,12 @@ export class VirtualUserManager extends EventEmitter {
|
|
|
65
65
|
// this.users.set(currentUser, this.createRecord(currentUser, userPassword));
|
|
66
66
|
// this.sudoers.add(currentUser);
|
|
67
67
|
// changed = true;
|
|
68
|
-
// const homePath = `/home/${currentUser}`;
|
|
69
|
-
// if (!this.vfs.exists(homePath)) {
|
|
70
|
-
// this.vfs.mkdir(homePath, 0o755);
|
|
71
|
-
// this.vfs.writeFile(
|
|
72
|
-
// `${homePath}/README.txt`,
|
|
73
|
-
// `Welcome to the virtual environment, ${currentUser}`,
|
|
74
|
-
// );
|
|
75
|
-
// }
|
|
76
68
|
// }
|
|
69
|
+
const homePath = `/home/root`;
|
|
70
|
+
if (!this.vfs.exists(homePath)) {
|
|
71
|
+
this.vfs.mkdir(homePath, 0o755);
|
|
72
|
+
this.vfs.writeFile(`${homePath}/README.txt`, `Welcome to the virtual environment, root`);
|
|
73
|
+
}
|
|
77
74
|
if (changed) {
|
|
78
75
|
await this.persist();
|
|
79
76
|
}
|
package/package.json
CHANGED
|
@@ -99,16 +99,16 @@ export class VirtualUserManager extends EventEmitter {
|
|
|
99
99
|
// this.users.set(currentUser, this.createRecord(currentUser, userPassword));
|
|
100
100
|
// this.sudoers.add(currentUser);
|
|
101
101
|
// changed = true;
|
|
102
|
-
|
|
103
|
-
// const homePath = `/home/${currentUser}`;
|
|
104
|
-
// if (!this.vfs.exists(homePath)) {
|
|
105
|
-
// this.vfs.mkdir(homePath, 0o755);
|
|
106
|
-
// this.vfs.writeFile(
|
|
107
|
-
// `${homePath}/README.txt`,
|
|
108
|
-
// `Welcome to the virtual environment, ${currentUser}`,
|
|
109
|
-
// );
|
|
110
|
-
// }
|
|
111
102
|
// }
|
|
103
|
+
|
|
104
|
+
const homePath = `/home/root`;
|
|
105
|
+
if (!this.vfs.exists(homePath)) {
|
|
106
|
+
this.vfs.mkdir(homePath, 0o755);
|
|
107
|
+
this.vfs.writeFile(
|
|
108
|
+
`${homePath}/README.txt`,
|
|
109
|
+
`Welcome to the virtual environment, root`,
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
112
|
|
|
113
113
|
if (changed) {
|
|
114
114
|
await this.persist();
|