penguins-eggs 9.3.26 → 9.3.28
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/.oclif.manifest.json +1 -1
- package/conf/derivatives.yaml +7 -0
- package/dist/classes/bleach.js +26 -24
- package/dist/classes/compressors.js +7 -5
- package/dist/classes/daddy.js +38 -36
- package/dist/classes/distro.js +30 -27
- package/dist/classes/family/archlinux.js +21 -19
- package/dist/classes/family/debian.js +33 -31
- package/dist/classes/family/fedora.js +19 -17
- package/dist/classes/family/suse.js +19 -17
- package/dist/classes/incubation/branding.js +8 -6
- package/dist/classes/incubation/distros/bionic.js +5 -3
- package/dist/classes/incubation/distros/buster.js +5 -3
- package/dist/classes/incubation/distros/focal.js +5 -3
- package/dist/classes/incubation/distros/jessie.js +6 -4
- package/dist/classes/incubation/distros/rolling.js +9 -7
- package/dist/classes/incubation/fisherman-helper/displaymanager.js +5 -3
- package/dist/classes/incubation/fisherman-helper/packages.js +17 -15
- package/dist/classes/incubation/fisherman.js +19 -19
- package/dist/classes/incubation/incubator.js +37 -35
- package/dist/classes/incubation/installer.js +8 -6
- package/dist/classes/initrd.js +5 -3
- package/dist/classes/keyboards.js +25 -23
- package/dist/classes/locales.js +19 -17
- package/dist/classes/n8.js +4 -2
- package/dist/classes/network.js +9 -9
- package/dist/classes/ovary.js +280 -281
- package/dist/classes/pacman.js +128 -128
- package/dist/classes/pve-live.js +7 -5
- package/dist/classes/pxe.js +141 -138
- package/dist/classes/settings.js +34 -32
- package/dist/classes/sources_list.js +31 -31
- package/dist/classes/systemctl.js +16 -14
- package/dist/classes/tailor.js +255 -262
- package/dist/classes/tools.js +7 -5
- package/dist/classes/users.js +30 -28
- package/dist/classes/utils.js +22 -20
- package/dist/classes/xdg.js +60 -58
- package/dist/classes/yolk.js +33 -33
- package/dist/commands/adapt.js +14 -12
- package/dist/commands/analyze.js +48 -15
- package/dist/commands/calamares.js +28 -26
- package/dist/commands/config.js +77 -79
- package/dist/commands/cuckoo.js +19 -17
- package/dist/commands/dad.js +16 -14
- package/dist/commands/export/deb.js +19 -17
- package/dist/commands/export/iso.js +17 -15
- package/dist/commands/install.js +31 -29
- package/dist/commands/kill.js +17 -15
- package/dist/commands/mom.js +11 -9
- package/dist/commands/produce.js +30 -28
- package/dist/commands/status.js +7 -5
- package/dist/commands/syncfrom.js +41 -41
- package/dist/commands/syncto.js +77 -80
- package/dist/commands/tools/clean.js +13 -11
- package/dist/commands/tools/ppa.js +26 -24
- package/dist/commands/tools/skel.js +18 -16
- package/dist/commands/tools/stat.js +12 -10
- package/dist/commands/tools/yolk.js +13 -11
- package/dist/commands/update.js +29 -27
- package/dist/commands/wardrobe/get.js +14 -12
- package/dist/commands/wardrobe/list.js +25 -23
- package/dist/commands/wardrobe/show.js +25 -23
- package/dist/commands/wardrobe/wear.js +24 -22
- package/dist/components/elements/information.js +21 -19
- package/dist/components/elements/steps.js +4 -2
- package/dist/components/elements/title.js +4 -2
- package/dist/components/finished.js +10 -8
- package/dist/components/install.js +10 -8
- package/dist/components/keyboard.js +10 -8
- package/dist/components/location.js +10 -8
- package/dist/components/network.js +10 -8
- package/dist/components/partitions.js +10 -8
- package/dist/components/summary.js +10 -8
- package/dist/components/users.js +33 -8
- package/dist/components/welcome.js +10 -8
- package/dist/interfaces/i-packages.js +1 -1
- package/dist/interfaces/i-pxe.js +39 -0
- package/dist/krill/krill-prepare.js +92 -90
- package/dist/krill/krill-sequence.js +148 -145
- package/dist/krill/modules/add-user.js +11 -9
- package/dist/krill/modules/bootloader-config-ubuntu.js +25 -23
- package/dist/krill/modules/bootloader.js +11 -9
- package/dist/krill/modules/change-password.js +2 -2
- package/dist/krill/modules/del-live-user.js +8 -6
- package/dist/krill/modules/fstab.js +35 -33
- package/dist/krill/modules/grubcfg.js +8 -6
- package/dist/krill/modules/hostname.js +19 -17
- package/dist/krill/modules/initramfs-cfg.js +6 -4
- package/dist/krill/modules/initramfs.js +17 -15
- package/dist/krill/modules/locale-cfg.js +12 -10
- package/dist/krill/modules/locale.js +13 -11
- package/dist/krill/modules/m-keyboard.js +33 -31
- package/dist/krill/modules/m-timezone.js +7 -5
- package/dist/krill/modules/machine-id.js +8 -6
- package/dist/krill/modules/mkfs.js +7 -7
- package/dist/krill/modules/mount-fs.js +22 -22
- package/dist/krill/modules/mount-vfs.js +12 -12
- package/dist/krill/modules/network-cfg.js +21 -21
- package/dist/krill/modules/packages.js +20 -18
- package/dist/krill/modules/partition.js +148 -139
- package/dist/krill/modules/remove-installer-link.js +5 -3
- package/dist/krill/modules/umount.js +9 -7
- package/dist/krill/modules/unpackfs.js +8 -6
- package/dist/lib/cli-autologin.js +163 -163
- package/dist/lib/dependencies.js +10 -10
- package/dist/lib/get_address.js +6 -4
- package/dist/lib/get_dns.js +6 -4
- package/dist/lib/get_domain.js +6 -4
- package/dist/lib/get_gateway.js +6 -4
- package/dist/lib/get_hostname.js +6 -4
- package/dist/lib/get_netmask.js +6 -4
- package/dist/lib/get_password.js +8 -6
- package/dist/lib/get_root_password.js +7 -5
- package/dist/lib/get_userfullname.js +6 -4
- package/dist/lib/get_username.js +6 -4
- package/dist/lib/select_address_type.js +6 -4
- package/dist/lib/select_filesystem_type.js +8 -6
- package/dist/lib/select_installation_device.js +7 -5
- package/dist/lib/select_installation_mode.js +6 -4
- package/dist/lib/select_interface.js +6 -4
- package/dist/lib/select_keyboard_layout.js +10 -8
- package/dist/lib/select_keyboard_model.js +10 -8
- package/dist/lib/select_keyboard_option.js +10 -8
- package/dist/lib/select_keyboard_variant.js +10 -8
- package/dist/lib/select_languages.js +9 -7
- package/dist/lib/select_regions.js +6 -4
- package/dist/lib/select_user_swap_choice.js +8 -6
- package/dist/lib/select_zones.js +12 -10
- package/dist/lib/utils.js +3 -3
- package/package.json +12 -5
- package/dist/dhcpd/dhcpd.js +0 -222
- package/dist/dhcpd/index.js +0 -7
- package/dist/dhcpd/packet/converters.js +0 -377
- package/dist/dhcpd/packet/options.js +0 -2
- package/dist/dhcpd/packet/types.js +0 -2
- package/dist/dhcpd/packet.js +0 -251
- package/dist/dhcpd/proxy.js +0 -152
- package/dist/dhcpd/server.js +0 -152
- package/dist/dhcpd/sprintf.js +0 -170
- package/dist/dhcpd/utils.js +0 -190
- package/dist/interfaces/i-pxe-options.js +0 -2
package/dist/classes/yolk.js
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
6
|
/**
|
|
5
7
|
* penguins-eggs-v7 based on Debian live
|
|
6
8
|
* author: Piero Proietti
|
|
7
9
|
* email: piero.proietti@gmail.com
|
|
8
10
|
* license: MIT
|
|
9
11
|
*/
|
|
10
|
-
const fs_1 =
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const shelljs_1 =
|
|
12
|
+
const fs_1 = __importDefault(require("fs"));
|
|
13
|
+
const utils_js_1 = __importDefault(require("./utils.js"));
|
|
14
|
+
const pacman_js_1 = __importDefault(require("./pacman.js"));
|
|
15
|
+
const bleach_js_1 = __importDefault(require("./bleach.js"));
|
|
16
|
+
const utils_js_2 = require("../lib/utils.js");
|
|
17
|
+
const shelljs_1 = __importDefault(require("shelljs"));
|
|
16
18
|
/**
|
|
17
19
|
*
|
|
18
20
|
*/
|
|
@@ -27,23 +29,23 @@ class Yolk {
|
|
|
27
29
|
*/
|
|
28
30
|
async create(verbose = false) {
|
|
29
31
|
this.verbose = verbose;
|
|
30
|
-
this.echo =
|
|
31
|
-
|
|
32
|
-
if (!
|
|
32
|
+
this.echo = utils_js_1.default.setEcho(verbose);
|
|
33
|
+
utils_js_1.default.warning('updating system...');
|
|
34
|
+
if (!pacman_js_1.default.commandIsInstalled('dpkg-scanpackages')) {
|
|
33
35
|
process.exit(0);
|
|
34
36
|
}
|
|
35
37
|
let cmd = '';
|
|
36
38
|
try {
|
|
37
39
|
cmd = 'apt-get update --yes';
|
|
38
|
-
await (0,
|
|
40
|
+
await (0, utils_js_2.exec)(cmd, this.echo);
|
|
39
41
|
}
|
|
40
42
|
catch (error) {
|
|
41
43
|
console.log(error);
|
|
42
|
-
await
|
|
44
|
+
await utils_js_1.default.pressKeyToExit(cmd);
|
|
43
45
|
}
|
|
44
46
|
if (!this.yolkExists()) {
|
|
45
|
-
await (0,
|
|
46
|
-
await (0,
|
|
47
|
+
await (0, utils_js_2.exec)(`mkdir ${this.yolkDir} -p`, this.echo);
|
|
48
|
+
await (0, utils_js_2.exec)(`chown _apt:root ${this.yolkDir} -R`, this.echo);
|
|
47
49
|
}
|
|
48
50
|
else {
|
|
49
51
|
await this.yolkClean();
|
|
@@ -51,37 +53,37 @@ class Yolk {
|
|
|
51
53
|
// packages we need
|
|
52
54
|
const packages = ['cryptsetup', 'keyutils', 'shim-signed']; // addes shim-signed
|
|
53
55
|
// grub-pc just for amd64 or i386
|
|
54
|
-
if (
|
|
56
|
+
if (utils_js_1.default.machineArch() === 'amd64' || utils_js_1.default.machineArch() === 'i386') {
|
|
55
57
|
packages.push('grub-pc');
|
|
56
58
|
}
|
|
57
59
|
// if not i386
|
|
58
|
-
if (
|
|
60
|
+
if (utils_js_1.default.machineArch() !== 'i386') {
|
|
59
61
|
// add grub-efi-amd64
|
|
60
|
-
packages.push('grub-efi-' +
|
|
62
|
+
packages.push('grub-efi-' + utils_js_1.default.machineArch());
|
|
61
63
|
// add grub-efi-amd64-bin
|
|
62
|
-
packages.push('grub-efi-' +
|
|
64
|
+
packages.push('grub-efi-' + utils_js_1.default.machineArch() + '-bin');
|
|
63
65
|
}
|
|
64
66
|
// chdir on yolkDir
|
|
65
67
|
process.chdir(this.yolkDir);
|
|
66
68
|
// for all packages, find dependencies and check if are not installed
|
|
67
69
|
for (const package_ of packages) {
|
|
68
|
-
|
|
70
|
+
utils_js_1.default.warning(`downloading package ${package_} and it's dependencies...`);
|
|
69
71
|
cmd = `apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances ${package_} | grep "^\\w" | sort -u`;
|
|
70
|
-
const depends = (await (0,
|
|
72
|
+
const depends = (await (0, utils_js_2.exec)(cmd, { echo: false, capture: true })).data;
|
|
71
73
|
await this.installDeps(depends.split('\n'));
|
|
72
74
|
}
|
|
73
75
|
// create Package.gz
|
|
74
76
|
cmd = 'dpkg-scanpackages -h md5,sha1,sha256 . | gzip -c > Packages.gz';
|
|
75
|
-
|
|
76
|
-
await (0,
|
|
77
|
+
utils_js_1.default.warning(cmd);
|
|
78
|
+
await (0, utils_js_2.exec)(cmd, { echo: false, capture: true });
|
|
77
79
|
// Create Release date: Sat, 14 Aug 2021 07:42:00 UTC
|
|
78
80
|
const now = shelljs_1.default.exec('date -R -u').stdout.trim();
|
|
79
|
-
const content = `Archive: stable\nComponent: yolk\nOrigin: penguins-eggs\nArchitecture: ${
|
|
80
|
-
|
|
81
|
+
const content = `Archive: stable\nComponent: yolk\nOrigin: penguins-eggs\nArchitecture: ${utils_js_1.default.machineArch()} \nDate: ${now}\n`;
|
|
82
|
+
utils_js_1.default.warning('Writing Release');
|
|
81
83
|
fs_1.default.writeFileSync('Release', content);
|
|
82
84
|
// Cleaning
|
|
83
|
-
|
|
84
|
-
const bleach = new
|
|
85
|
+
utils_js_1.default.warning('Cleaning apt cache');
|
|
86
|
+
const bleach = new bleach_js_1.default();
|
|
85
87
|
await bleach.clean(verbose);
|
|
86
88
|
}
|
|
87
89
|
/**
|
|
@@ -93,18 +95,16 @@ class Yolk {
|
|
|
93
95
|
// select for downloads only packages NOT already installed
|
|
94
96
|
const toDownloads = [];
|
|
95
97
|
for (const depend of depends) {
|
|
96
|
-
if (depend !== '') {
|
|
97
|
-
|
|
98
|
-
toDownloads.push(depend);
|
|
99
|
-
}
|
|
98
|
+
if (depend !== '' && !pacman_js_1.default.packageIsInstalled(depend)) {
|
|
99
|
+
toDownloads.push(depend);
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
// now we go to downloads them
|
|
103
103
|
for (const toDownload of toDownloads) {
|
|
104
104
|
process.chdir(this.yolkDir);
|
|
105
105
|
const cmd = `apt-get download ${toDownload}`;
|
|
106
|
-
|
|
107
|
-
await (0,
|
|
106
|
+
utils_js_1.default.warning(`- ${cmd}`);
|
|
107
|
+
await (0, utils_js_2.exec)(cmd, this.echo);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
/**
|
|
@@ -118,7 +118,7 @@ class Yolk {
|
|
|
118
118
|
* Svuota la repo yolk
|
|
119
119
|
*/
|
|
120
120
|
async yolkClean() {
|
|
121
|
-
await (0,
|
|
121
|
+
await (0, utils_js_2.exec)(`rm ${this.yolkDir}/*`, this.echo);
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
exports.default = Yolk;
|
package/dist/commands/adapt.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
6
|
const core_1 = require("@oclif/core");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
+
const utils_js_1 = __importDefault(require("../classes/utils.js"));
|
|
8
|
+
const utils_js_2 = require("../lib/utils.js");
|
|
7
9
|
class Adapt extends core_1.Command {
|
|
8
10
|
async run() {
|
|
9
11
|
const { args, flags } = await this.parse(Adapt);
|
|
@@ -11,22 +13,22 @@ class Adapt extends core_1.Command {
|
|
|
11
13
|
if (flags.verbose) {
|
|
12
14
|
verbose = true;
|
|
13
15
|
}
|
|
14
|
-
const echo =
|
|
16
|
+
const echo = utils_js_1.default.setEcho(verbose);
|
|
15
17
|
// const {args, flags} = this.parse(Adjust)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
await (0,
|
|
19
|
-
await (0,
|
|
20
|
-
await (0,
|
|
21
|
-
await (0,
|
|
18
|
+
utils_js_1.default.titles(this.id + ' ' + this.argv);
|
|
19
|
+
utils_js_1.default.warning('Adapt monitor resolutions to the size of window in virtual machines');
|
|
20
|
+
await (0, utils_js_2.exec)('xrandr --output Virtual-0 --auto', echo);
|
|
21
|
+
await (0, utils_js_2.exec)('xrandr --output Virtual-1 --auto', echo);
|
|
22
|
+
await (0, utils_js_2.exec)('xrandr --output Virtual-2 --auto', echo);
|
|
23
|
+
await (0, utils_js_2.exec)('xrandr --output Virtual-3 --auto', echo);
|
|
22
24
|
}
|
|
23
25
|
}
|
|
24
26
|
exports.default = Adapt;
|
|
25
27
|
Adapt.flags = {
|
|
26
28
|
help: core_1.Flags.help({ char: 'h' }),
|
|
27
|
-
verbose: core_1.Flags.boolean({ char: 'v' })
|
|
29
|
+
verbose: core_1.Flags.boolean({ char: 'v' }),
|
|
28
30
|
};
|
|
29
31
|
Adapt.description = 'adapt monitor resolution for VM only';
|
|
30
32
|
Adapt.examples = [
|
|
31
|
-
|
|
33
|
+
'eggs adapt',
|
|
32
34
|
];
|
package/dist/commands/analyze.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
6
|
/**
|
|
5
7
|
* penguins-eggs-v7 based on Debian live
|
|
6
8
|
* author: Piero Proietti
|
|
@@ -8,11 +10,12 @@ const tslib_1 = require("tslib");
|
|
|
8
10
|
* license: MIT
|
|
9
11
|
*/
|
|
10
12
|
const core_1 = require("@oclif/core");
|
|
11
|
-
const fs_1 =
|
|
12
|
-
const
|
|
13
|
+
const fs_1 = __importDefault(require("fs"));
|
|
14
|
+
const utils_js_1 = __importDefault(require("../classes/utils.js"));
|
|
13
15
|
const promises_1 = require("fs/promises");
|
|
14
16
|
const fs_2 = require("fs");
|
|
15
|
-
const
|
|
17
|
+
const users_js_1 = __importDefault(require("../classes/users.js"));
|
|
18
|
+
const systeminformation_1 = __importDefault(require("systeminformation"));
|
|
16
19
|
class Analyze extends core_1.Command {
|
|
17
20
|
constructor() {
|
|
18
21
|
super(...arguments);
|
|
@@ -21,27 +24,57 @@ class Analyze extends core_1.Command {
|
|
|
21
24
|
this.work_dir = {};
|
|
22
25
|
}
|
|
23
26
|
async run() {
|
|
24
|
-
|
|
27
|
+
utils_js_1.default.titles(this.id + ' ' + this.argv);
|
|
25
28
|
const { flags } = await this.parse(Analyze);
|
|
26
29
|
let verbose = false;
|
|
27
30
|
if (flags.verbose) {
|
|
28
31
|
verbose = true;
|
|
29
32
|
}
|
|
30
|
-
const echo =
|
|
33
|
+
const echo = utils_js_1.default.setEcho(verbose);
|
|
31
34
|
let totalSize = 0;
|
|
32
|
-
if (
|
|
33
|
-
|
|
35
|
+
if (utils_js_1.default.isRoot(this.id)) {
|
|
36
|
+
const audio = await systeminformation_1.default.audio();
|
|
37
|
+
const bios = await systeminformation_1.default.bios();
|
|
38
|
+
const blockDevices = await systeminformation_1.default.blockDevices();
|
|
39
|
+
const chassis = await systeminformation_1.default.chassis();
|
|
40
|
+
const cpu = await systeminformation_1.default.cpu();
|
|
41
|
+
const diskLayout = await systeminformation_1.default.diskLayout();
|
|
42
|
+
const mem = await systeminformation_1.default.mem();
|
|
43
|
+
const usb = await systeminformation_1.default.usb();
|
|
44
|
+
console.log(`chassis: ${chassis.manufacturer} model: ${chassis.manufacturer}`);
|
|
45
|
+
console.log(`bios vendor: ${bios.vendor} version: ${bios.version} revision: ${bios.revision}`);
|
|
46
|
+
console.log(`processor: ${cpu.brand} core: ${cpu.cores} `);
|
|
47
|
+
if (diskLayout[0].device !== undefined) {
|
|
48
|
+
console.log(`disk0: ${diskLayout[0].device}`);
|
|
49
|
+
}
|
|
50
|
+
if (diskLayout[1] !== undefined) {
|
|
51
|
+
console.log(`disk1: ${diskLayout[1].device}`);
|
|
52
|
+
}
|
|
53
|
+
if (diskLayout[2] !== undefined) {
|
|
54
|
+
console.log(`disk1: ${diskLayout[2].device}`);
|
|
55
|
+
}
|
|
56
|
+
console.log(`name: ${blockDevices[0].name} fs: ${blockDevices[0].fsType}`);
|
|
57
|
+
console.log(`name: ${blockDevices[1].name} fs: ${blockDevices[1].fsType}`);
|
|
58
|
+
console.log(`name: ${blockDevices[2].name} fs: ${blockDevices[2].fsType}`);
|
|
59
|
+
console.log(`name: ${blockDevices[3].name} fs: ${blockDevices[3].fsType}`);
|
|
60
|
+
console.log(`usb: ${usb[0].name}`);
|
|
61
|
+
/**
|
|
62
|
+
* Windows: "/Documents and Settings", "/Programs", "/AppData"
|
|
63
|
+
* MacOS: "/Users"
|
|
64
|
+
* Linux: "/home"
|
|
65
|
+
*/
|
|
66
|
+
utils_js_1.default.warning('eggs will analyze your system, to get users and servers data');
|
|
34
67
|
const users = await this.fill();
|
|
35
68
|
for (let i = 0; i < users.length; i++)
|
|
36
69
|
if (users[i].saveIt) {
|
|
37
|
-
console.log(`user: ${users[i].login} \thome: ${users[i].home.padEnd(16)} \tsize: ${
|
|
70
|
+
console.log(`user: ${users[i].login} \thome: ${users[i].home.padEnd(16)} \tsize: ${utils_js_1.default.formatBytes(users[i].size)} \tBytes: ${users[i].size} `);
|
|
38
71
|
// console.log(`user: ${users[i].login} \thome: ${users[i].home} \tsize: ${users[i].size}`)
|
|
39
72
|
totalSize += users[i].size;
|
|
40
73
|
}
|
|
41
|
-
console.log(`Total\t\t\t\t\tSize: ${
|
|
74
|
+
console.log(`Total\t\t\t\t\tSize: ${utils_js_1.default.formatBytes(totalSize)} \tBytes: ${totalSize}`);
|
|
42
75
|
}
|
|
43
76
|
else {
|
|
44
|
-
|
|
77
|
+
utils_js_1.default.useRoot(this.id);
|
|
45
78
|
}
|
|
46
79
|
}
|
|
47
80
|
/**
|
|
@@ -52,9 +85,9 @@ class Analyze extends core_1.Command {
|
|
|
52
85
|
const usersArray = [];
|
|
53
86
|
await (0, promises_1.access)('/etc/passwd', fs_2.constants.R_OK | fs_2.constants.W_OK);
|
|
54
87
|
const passwd = fs_1.default.readFileSync('/etc/passwd', 'utf-8').split('\n');
|
|
55
|
-
for (
|
|
56
|
-
|
|
57
|
-
const users = new
|
|
88
|
+
for (const element of passwd) {
|
|
89
|
+
const line = element.split(':');
|
|
90
|
+
const users = new users_js_1.default(line[0], line[1], line[2], line[3], line[4], line[5], line[6]);
|
|
58
91
|
await users.getValues();
|
|
59
92
|
if (users.password !== undefined) {
|
|
60
93
|
usersArray.push(users);
|
|
@@ -71,7 +104,7 @@ class Analyze extends core_1.Command {
|
|
|
71
104
|
exports.default = Analyze;
|
|
72
105
|
Analyze.flags = {
|
|
73
106
|
help: core_1.Flags.help({ char: 'h' }),
|
|
74
|
-
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
107
|
+
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' }),
|
|
75
108
|
};
|
|
76
109
|
Analyze.description = 'analyze for syncto';
|
|
77
110
|
Analyze.examples = ['sudo eggs analyze'];
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
6
|
/**
|
|
5
7
|
* penguins-eggs-v7 based on Debian live
|
|
6
8
|
* author: Piero Proietti
|
|
@@ -8,10 +10,10 @@ const tslib_1 = require("tslib");
|
|
|
8
10
|
* license: MIT
|
|
9
11
|
*/
|
|
10
12
|
const core_1 = require("@oclif/core");
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
13
|
+
const utils_js_1 = __importDefault(require("../classes/utils.js"));
|
|
14
|
+
const settings_js_1 = __importDefault(require("../classes/settings.js"));
|
|
15
|
+
const incubator_js_1 = __importDefault(require("../classes/incubation/incubator.js"));
|
|
16
|
+
const pacman_js_1 = __importDefault(require("../classes/pacman.js"));
|
|
15
17
|
class Calamares extends core_1.Command {
|
|
16
18
|
constructor() {
|
|
17
19
|
super(...arguments);
|
|
@@ -20,8 +22,8 @@ class Calamares extends core_1.Command {
|
|
|
20
22
|
this.settings = {};
|
|
21
23
|
}
|
|
22
24
|
async run() {
|
|
23
|
-
|
|
24
|
-
this.settings = new
|
|
25
|
+
utils_js_1.default.titles(this.id + ' ' + this.argv);
|
|
26
|
+
this.settings = new settings_js_1.default();
|
|
25
27
|
const { flags } = await this.parse(Calamares);
|
|
26
28
|
let verbose = false;
|
|
27
29
|
if (flags.verbose) {
|
|
@@ -43,35 +45,35 @@ class Calamares extends core_1.Command {
|
|
|
43
45
|
if (flags.theme !== undefined) {
|
|
44
46
|
theme = flags.theme;
|
|
45
47
|
}
|
|
46
|
-
|
|
48
|
+
const nointeractive = flags.nointeractive;
|
|
47
49
|
console.log(`theme: ${theme}`);
|
|
48
|
-
if (
|
|
50
|
+
if (utils_js_1.default.isRoot(this.id)) {
|
|
49
51
|
let installer = 'krill';
|
|
50
|
-
if (
|
|
52
|
+
if (pacman_js_1.default.isInstalledGui()) {
|
|
51
53
|
installer = 'calamares';
|
|
52
54
|
}
|
|
53
55
|
if (installer === 'calamares') {
|
|
54
56
|
if (!remove) {
|
|
55
|
-
if (!nointeractive || await
|
|
57
|
+
if (!nointeractive || await utils_js_1.default.customConfirm('Select yes to continue...')) {
|
|
56
58
|
/**
|
|
57
59
|
* Install calamares
|
|
58
60
|
*/
|
|
59
61
|
if (install) {
|
|
60
|
-
|
|
61
|
-
await
|
|
62
|
+
utils_js_1.default.warning('Installing calamares...');
|
|
63
|
+
await pacman_js_1.default.calamaresInstall();
|
|
62
64
|
if (await this.settings.load()) {
|
|
63
65
|
this.settings.config.force_installer = true;
|
|
64
66
|
this.settings.save(this.settings.config);
|
|
65
|
-
await
|
|
67
|
+
await pacman_js_1.default.calamaresPolicies();
|
|
66
68
|
}
|
|
67
69
|
}
|
|
68
70
|
/**
|
|
69
71
|
* Configure calamares
|
|
70
72
|
*/
|
|
71
73
|
if (await this.settings.load()) {
|
|
72
|
-
|
|
74
|
+
utils_js_1.default.warning('Configuring installer');
|
|
73
75
|
await this.settings.loadRemix(this.settings.config.snapshot_basename, theme);
|
|
74
|
-
this.incubator = new
|
|
76
|
+
this.incubator = new incubator_js_1.default(this.settings.remix, this.settings.distro, this.settings.config.user_opt, theme, verbose);
|
|
75
77
|
await this.incubator.config(release);
|
|
76
78
|
}
|
|
77
79
|
}
|
|
@@ -80,8 +82,8 @@ class Calamares extends core_1.Command {
|
|
|
80
82
|
/**
|
|
81
83
|
* Remove calamares
|
|
82
84
|
*/
|
|
83
|
-
if (await
|
|
84
|
-
await
|
|
85
|
+
if (await pacman_js_1.default.calamaresCheck()) {
|
|
86
|
+
await pacman_js_1.default.calamaresRemove();
|
|
85
87
|
if (await this.settings.load()) {
|
|
86
88
|
this.settings.config.force_installer = false;
|
|
87
89
|
this.settings.save(this.settings.config);
|
|
@@ -89,10 +91,10 @@ class Calamares extends core_1.Command {
|
|
|
89
91
|
}
|
|
90
92
|
}
|
|
91
93
|
}
|
|
92
|
-
else if ((await
|
|
93
|
-
|
|
94
|
+
else if ((await utils_js_1.default.customConfirm('Select yes to continue...')) && (await this.settings.load())) {
|
|
95
|
+
utils_js_1.default.warning('Configuring krill');
|
|
94
96
|
await this.settings.loadRemix(this.settings.config.snapshot_basename, theme);
|
|
95
|
-
this.incubator = new
|
|
97
|
+
this.incubator = new incubator_js_1.default(this.settings.remix, this.settings.distro, this.settings.config.user_opt, theme, verbose);
|
|
96
98
|
console.log('calamares relase: ' + release);
|
|
97
99
|
await this.incubator.config(release);
|
|
98
100
|
}
|
|
@@ -107,12 +109,12 @@ Calamares.flags = {
|
|
|
107
109
|
release: core_1.Flags.boolean({ char: 'r', description: "release: remove calamares and all it's dependencies after the installation" }),
|
|
108
110
|
remove: core_1.Flags.boolean({ description: "remove calamares and it's dependencies" }),
|
|
109
111
|
theme: core_1.Flags.string({ description: 'theme/branding for eggs and calamares' }),
|
|
110
|
-
verbose: core_1.Flags.boolean({ char: 'v' })
|
|
112
|
+
verbose: core_1.Flags.boolean({ char: 'v' }),
|
|
111
113
|
};
|
|
112
114
|
Calamares.description = 'configure calamares or install or configure it';
|
|
113
115
|
Calamares.examples = [
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
'sudo eggs calamares',
|
|
117
|
+
'sudo eggs calamares --install',
|
|
118
|
+
'sudo eggs calamares --install --theme=/path/to/theme',
|
|
119
|
+
'sudo eggs calamares --remove',
|
|
118
120
|
];
|