penguins-eggs 10.0.48 → 10.0.49
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/README.md +27 -27
- package/dist/classes/distro.js +6 -5
- package/dist/classes/ovary.js +5 -3
- package/dist/classes/tailor.d.ts +7 -0
- package/dist/classes/tailor.js +18 -18
- package/dist/classes/utils.js +1 -2
- package/dist/components/information.js +4 -3
- package/dist/krill/modules/bootloader.js +60 -0
- package/dist/krill/modules/machine-id.js +11 -5
- package/package.json +2 -2
- package/scripts/lsb_release +97 -0
- package/syslinux/isohdpfx.bin +0 -0
package/.oclif.manifest.json
CHANGED
package/README.md
CHANGED
|
@@ -490,7 +490,7 @@ EXAMPLES
|
|
|
490
490
|
$ eggs adapt
|
|
491
491
|
```
|
|
492
492
|
|
|
493
|
-
_See code: [src/commands/adapt.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.
|
|
493
|
+
_See code: [src/commands/adapt.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.49/src/commands/adapt.ts)_
|
|
494
494
|
|
|
495
495
|
## `eggs analyze`
|
|
496
496
|
|
|
@@ -511,7 +511,7 @@ EXAMPLES
|
|
|
511
511
|
sudo eggs analyze
|
|
512
512
|
```
|
|
513
513
|
|
|
514
|
-
_See code: [src/commands/analyze.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.
|
|
514
|
+
_See code: [src/commands/analyze.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.49/src/commands/analyze.ts)_
|
|
515
515
|
|
|
516
516
|
## `eggs autocomplete [SHELL]`
|
|
517
517
|
|
|
@@ -542,7 +542,7 @@ EXAMPLES
|
|
|
542
542
|
$ eggs autocomplete --refresh-cache
|
|
543
543
|
```
|
|
544
544
|
|
|
545
|
-
_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v3.2.
|
|
545
|
+
_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v3.2.8/src/commands/autocomplete/index.ts)_
|
|
546
546
|
|
|
547
547
|
## `eggs calamares`
|
|
548
548
|
|
|
@@ -575,7 +575,7 @@ EXAMPLES
|
|
|
575
575
|
sudo eggs calamares --remove
|
|
576
576
|
```
|
|
577
577
|
|
|
578
|
-
_See code: [src/commands/calamares.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.
|
|
578
|
+
_See code: [src/commands/calamares.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.49/src/commands/calamares.ts)_
|
|
579
579
|
|
|
580
580
|
## `eggs config`
|
|
581
581
|
|
|
@@ -602,7 +602,7 @@ EXAMPLES
|
|
|
602
602
|
sudo eggs config --clean --nointeractive
|
|
603
603
|
```
|
|
604
604
|
|
|
605
|
-
_See code: [src/commands/config.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.
|
|
605
|
+
_See code: [src/commands/config.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.49/src/commands/config.ts)_
|
|
606
606
|
|
|
607
607
|
## `eggs cuckoo`
|
|
608
608
|
|
|
@@ -622,7 +622,7 @@ EXAMPLES
|
|
|
622
622
|
sudo eggs cuckoo
|
|
623
623
|
```
|
|
624
624
|
|
|
625
|
-
_See code: [src/commands/cuckoo.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.
|
|
625
|
+
_See code: [src/commands/cuckoo.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.49/src/commands/cuckoo.ts)_
|
|
626
626
|
|
|
627
627
|
## `eggs dad`
|
|
628
628
|
|
|
@@ -650,7 +650,7 @@ EXAMPLES
|
|
|
650
650
|
sudo dad --default
|
|
651
651
|
```
|
|
652
652
|
|
|
653
|
-
_See code: [src/commands/dad.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.
|
|
653
|
+
_See code: [src/commands/dad.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.49/src/commands/dad.ts)_
|
|
654
654
|
|
|
655
655
|
## `eggs export iso`
|
|
656
656
|
|
|
@@ -675,7 +675,7 @@ EXAMPLES
|
|
|
675
675
|
$ eggs export iso --clean
|
|
676
676
|
```
|
|
677
677
|
|
|
678
|
-
_See code: [src/commands/export/iso.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.
|
|
678
|
+
_See code: [src/commands/export/iso.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.49/src/commands/export/iso.ts)_
|
|
679
679
|
|
|
680
680
|
## `eggs export pkg`
|
|
681
681
|
|
|
@@ -702,7 +702,7 @@ EXAMPLES
|
|
|
702
702
|
$ eggs export pkg --all
|
|
703
703
|
```
|
|
704
704
|
|
|
705
|
-
_See code: [src/commands/export/pkg.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.
|
|
705
|
+
_See code: [src/commands/export/pkg.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.49/src/commands/export/pkg.ts)_
|
|
706
706
|
|
|
707
707
|
## `eggs help [COMMAND]`
|
|
708
708
|
|
|
@@ -763,7 +763,7 @@ EXAMPLES
|
|
|
763
763
|
sudo eggs install --chroot
|
|
764
764
|
```
|
|
765
765
|
|
|
766
|
-
_See code: [src/commands/install.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.
|
|
766
|
+
_See code: [src/commands/install.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.49/src/commands/install.ts)_
|
|
767
767
|
|
|
768
768
|
## `eggs kill`
|
|
769
769
|
|
|
@@ -786,7 +786,7 @@ EXAMPLES
|
|
|
786
786
|
sudo eggs kill
|
|
787
787
|
```
|
|
788
788
|
|
|
789
|
-
_See code: [src/commands/kill.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.
|
|
789
|
+
_See code: [src/commands/kill.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.49/src/commands/kill.ts)_
|
|
790
790
|
|
|
791
791
|
## `eggs krill`
|
|
792
792
|
|
|
@@ -846,7 +846,7 @@ EXAMPLES
|
|
|
846
846
|
$ eggs auto
|
|
847
847
|
```
|
|
848
848
|
|
|
849
|
-
_See code: [src/commands/love.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.
|
|
849
|
+
_See code: [src/commands/love.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.49/src/commands/love.ts)_
|
|
850
850
|
|
|
851
851
|
## `eggs mom`
|
|
852
852
|
|
|
@@ -866,7 +866,7 @@ EXAMPLES
|
|
|
866
866
|
$ eggs mom
|
|
867
867
|
```
|
|
868
868
|
|
|
869
|
-
_See code: [src/commands/mom.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.
|
|
869
|
+
_See code: [src/commands/mom.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.49/src/commands/mom.ts)_
|
|
870
870
|
|
|
871
871
|
## `eggs produce`
|
|
872
872
|
|
|
@@ -923,7 +923,7 @@ EXAMPLES
|
|
|
923
923
|
sudo eggs produce --excludes home # exclude ~/*
|
|
924
924
|
```
|
|
925
925
|
|
|
926
|
-
_See code: [src/commands/produce.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.
|
|
926
|
+
_See code: [src/commands/produce.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.49/src/commands/produce.ts)_
|
|
927
927
|
|
|
928
928
|
## `eggs status`
|
|
929
929
|
|
|
@@ -944,7 +944,7 @@ EXAMPLES
|
|
|
944
944
|
$ eggs status
|
|
945
945
|
```
|
|
946
946
|
|
|
947
|
-
_See code: [src/commands/status.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.
|
|
947
|
+
_See code: [src/commands/status.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.49/src/commands/status.ts)_
|
|
948
948
|
|
|
949
949
|
## `eggs syncfrom`
|
|
950
950
|
|
|
@@ -970,7 +970,7 @@ EXAMPLES
|
|
|
970
970
|
sudo eggs syncfrom --file /path/to/luks-volume
|
|
971
971
|
```
|
|
972
972
|
|
|
973
|
-
_See code: [src/commands/syncfrom.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.
|
|
973
|
+
_See code: [src/commands/syncfrom.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.49/src/commands/syncfrom.ts)_
|
|
974
974
|
|
|
975
975
|
## `eggs syncto`
|
|
976
976
|
|
|
@@ -997,7 +997,7 @@ EXAMPLES
|
|
|
997
997
|
sudo eggs syncto --excludes
|
|
998
998
|
```
|
|
999
999
|
|
|
1000
|
-
_See code: [src/commands/syncto.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.
|
|
1000
|
+
_See code: [src/commands/syncto.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.49/src/commands/syncto.ts)_
|
|
1001
1001
|
|
|
1002
1002
|
## `eggs tools clean`
|
|
1003
1003
|
|
|
@@ -1019,7 +1019,7 @@ EXAMPLES
|
|
|
1019
1019
|
sudo eggs tools clean
|
|
1020
1020
|
```
|
|
1021
1021
|
|
|
1022
|
-
_See code: [src/commands/tools/clean.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.
|
|
1022
|
+
_See code: [src/commands/tools/clean.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.49/src/commands/tools/clean.ts)_
|
|
1023
1023
|
|
|
1024
1024
|
## `eggs tools ppa`
|
|
1025
1025
|
|
|
@@ -1045,7 +1045,7 @@ EXAMPLES
|
|
|
1045
1045
|
sudo eggs tools ppa --remove
|
|
1046
1046
|
```
|
|
1047
1047
|
|
|
1048
|
-
_See code: [src/commands/tools/ppa.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.
|
|
1048
|
+
_See code: [src/commands/tools/ppa.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.49/src/commands/tools/ppa.ts)_
|
|
1049
1049
|
|
|
1050
1050
|
## `eggs tools skel`
|
|
1051
1051
|
|
|
@@ -1069,7 +1069,7 @@ EXAMPLES
|
|
|
1069
1069
|
sudo eggs tools skel --user user-to-be-copied
|
|
1070
1070
|
```
|
|
1071
1071
|
|
|
1072
|
-
_See code: [src/commands/tools/skel.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.
|
|
1072
|
+
_See code: [src/commands/tools/skel.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.49/src/commands/tools/skel.ts)_
|
|
1073
1073
|
|
|
1074
1074
|
## `eggs tools stat`
|
|
1075
1075
|
|
|
@@ -1095,7 +1095,7 @@ EXAMPLES
|
|
|
1095
1095
|
$ eggs tools stat --year
|
|
1096
1096
|
```
|
|
1097
1097
|
|
|
1098
|
-
_See code: [src/commands/tools/stat.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.
|
|
1098
|
+
_See code: [src/commands/tools/stat.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.49/src/commands/tools/stat.ts)_
|
|
1099
1099
|
|
|
1100
1100
|
## `eggs tools yolk`
|
|
1101
1101
|
|
|
@@ -1116,7 +1116,7 @@ EXAMPLES
|
|
|
1116
1116
|
sudo eggs tools yolk
|
|
1117
1117
|
```
|
|
1118
1118
|
|
|
1119
|
-
_See code: [src/commands/tools/yolk.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.
|
|
1119
|
+
_See code: [src/commands/tools/yolk.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.49/src/commands/tools/yolk.ts)_
|
|
1120
1120
|
|
|
1121
1121
|
## `eggs update`
|
|
1122
1122
|
|
|
@@ -1137,7 +1137,7 @@ EXAMPLES
|
|
|
1137
1137
|
$ eggs update
|
|
1138
1138
|
```
|
|
1139
1139
|
|
|
1140
|
-
_See code: [src/commands/update.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.
|
|
1140
|
+
_See code: [src/commands/update.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.49/src/commands/update.ts)_
|
|
1141
1141
|
|
|
1142
1142
|
## `eggs version`
|
|
1143
1143
|
|
|
@@ -1183,7 +1183,7 @@ EXAMPLES
|
|
|
1183
1183
|
$ eggs wardrobe get your-wardrobe
|
|
1184
1184
|
```
|
|
1185
1185
|
|
|
1186
|
-
_See code: [src/commands/wardrobe/get.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.
|
|
1186
|
+
_See code: [src/commands/wardrobe/get.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.49/src/commands/wardrobe/get.ts)_
|
|
1187
1187
|
|
|
1188
1188
|
## `eggs wardrobe list [REPO]`
|
|
1189
1189
|
|
|
@@ -1212,7 +1212,7 @@ EXAMPLES
|
|
|
1212
1212
|
$ eggs wardrobe list --distro arch
|
|
1213
1213
|
```
|
|
1214
1214
|
|
|
1215
|
-
_See code: [src/commands/wardrobe/list.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.
|
|
1215
|
+
_See code: [src/commands/wardrobe/list.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.49/src/commands/wardrobe/list.ts)_
|
|
1216
1216
|
|
|
1217
1217
|
## `eggs wardrobe show [REPO]`
|
|
1218
1218
|
|
|
@@ -1242,7 +1242,7 @@ EXAMPLES
|
|
|
1242
1242
|
$ eggs wardrobe show accessories/
|
|
1243
1243
|
```
|
|
1244
1244
|
|
|
1245
|
-
_See code: [src/commands/wardrobe/show.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.
|
|
1245
|
+
_See code: [src/commands/wardrobe/show.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.49/src/commands/wardrobe/show.ts)_
|
|
1246
1246
|
|
|
1247
1247
|
## `eggs wardrobe wear [REPO]`
|
|
1248
1248
|
|
|
@@ -1273,7 +1273,7 @@ EXAMPLES
|
|
|
1273
1273
|
sudo eggs wardrobe wear wagtail/waydroid
|
|
1274
1274
|
```
|
|
1275
1275
|
|
|
1276
|
-
_See code: [src/commands/wardrobe/wear.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.
|
|
1276
|
+
_See code: [src/commands/wardrobe/wear.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.49/src/commands/wardrobe/wear.ts)_
|
|
1277
1277
|
<!-- commandsstop -->
|
|
1278
1278
|
|
|
1279
1279
|
# penGUI
|
package/dist/classes/distro.js
CHANGED
|
@@ -55,9 +55,9 @@ class Distro {
|
|
|
55
55
|
* lsb_release -is per distribuzione
|
|
56
56
|
* lsb_release -rs per release
|
|
57
57
|
*/
|
|
58
|
-
this.codenameId = shell.exec(
|
|
59
|
-
this.releaseId = shell.exec(
|
|
60
|
-
this.distroId = shell.exec(
|
|
58
|
+
this.codenameId = shell.exec(`lsb_release -cs`, { silent: true }).stdout.toString().trim();
|
|
59
|
+
this.releaseId = shell.exec(`lsb_release -rs`, { silent: true }).stdout.toString().trim();
|
|
60
|
+
this.distroId = shell.exec(`lsb_release -is`, { silent: true }).stdout.toString().trim();
|
|
61
61
|
if (this.distroId === 'Debian' && this.codenameId === 'sid') {
|
|
62
62
|
this.codenameId = 'trixie';
|
|
63
63
|
}
|
|
@@ -85,10 +85,11 @@ class Distro {
|
|
|
85
85
|
/**
|
|
86
86
|
* Fedora compatible
|
|
87
87
|
*/
|
|
88
|
-
case '
|
|
88
|
+
case 'AlmaLinux':
|
|
89
|
+
case 'RockyLinux':
|
|
89
90
|
case 'Fedora': {
|
|
90
91
|
this.familyId = 'fedora';
|
|
91
|
-
this.distroLike =
|
|
92
|
+
this.distroLike = 'Fedora';
|
|
92
93
|
this.codenameId = 'rolling'; // viene rimosso dal nome
|
|
93
94
|
this.codenameLikeId = this.familyId; // per krill
|
|
94
95
|
this.liveMediumPath = '/run/initramfs/live/';
|
package/dist/classes/ovary.js
CHANGED
|
@@ -227,7 +227,7 @@ export default class Ovary {
|
|
|
227
227
|
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' mkdir /home/' + this.settings.config.user_opt, this.verbose));
|
|
228
228
|
// Create user using useradd
|
|
229
229
|
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' useradd ' + this.settings.config.user_opt + ' --home-dir /home/' + this.settings.config.user_opt + ' --shell /bin/bash ', this.verbose));
|
|
230
|
-
// live password
|
|
230
|
+
// live password don't work with SELINUX
|
|
231
231
|
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' echo ' + this.settings.config.user_opt + ':' + this.settings.config.user_opt_passwd + ' | chroot ' + this.settings.work_dir.merged + ' chpasswd', this.verbose));
|
|
232
232
|
// root password Don't work with SELINUX
|
|
233
233
|
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' echo root:' + this.settings.config.root_passwd + ' | chroot ' + this.settings.work_dir.merged + ' chpasswd', this.verbose));
|
|
@@ -774,11 +774,13 @@ export default class Ovary {
|
|
|
774
774
|
async syslinux(theme = 'eggs') {
|
|
775
775
|
let syspath = path.resolve(__dirname, `../../syslinux`);
|
|
776
776
|
await exec(`cp ${syspath}/chain.c32 ${this.settings.iso_work}/isolinux/`, this.echo);
|
|
777
|
+
await exec(`cp ${syspath}/isohdpfx.bin ${this.settings.iso_work}/isolinux/`, this.echo);
|
|
778
|
+
// just fo x64 arch
|
|
779
|
+
await exec(`cp ${syspath}/isolinux.bin ${this.settings.iso_work}/isolinux/`, this.echo);
|
|
777
780
|
await exec(`cp ${syspath}/ldlinux.c32 ${this.settings.iso_work}/isolinux/`, this.echo);
|
|
778
781
|
await exec(`cp ${syspath}/libcom32.c32 ${this.settings.iso_work}/isolinux/`, this.echo);
|
|
779
782
|
await exec(`cp ${syspath}/libutil.c32 ${this.settings.iso_work}/isolinux/`, this.echo);
|
|
780
783
|
await exec(`cp ${syspath}/vesamenu.c32 ${this.settings.iso_work}/isolinux/`, this.echo);
|
|
781
|
-
await exec(`cp ${syspath}/isolinux.bin ${this.settings.iso_work}/isolinux/`, this.echo);
|
|
782
784
|
const isolinuxThemeDest = this.settings.iso_work + 'isolinux/isolinux.theme.cfg';
|
|
783
785
|
let isolinuxThemeSrc = path.resolve(__dirname, `../../addons/${theme}/theme/livecd/isolinux.theme.cfg`);
|
|
784
786
|
if (this.theme.includes('/')) {
|
|
@@ -1731,7 +1733,7 @@ export default class Ovary {
|
|
|
1731
1733
|
// const preparer = '-preparer "prepared by eggs <https://penguins-eggs.net>" '
|
|
1732
1734
|
let isoHybridMbr = '';
|
|
1733
1735
|
if (this.settings.config.make_isohybrid) {
|
|
1734
|
-
const isolinuxFile = this.settings.distro.syslinuxPath + 'isohdpfx.bin';
|
|
1736
|
+
const isolinuxFile = this.settings.distro.syslinuxPath + '/isohdpfx.bin';
|
|
1735
1737
|
if (fs.existsSync(isolinuxFile)) {
|
|
1736
1738
|
isoHybridMbr = `-isohybrid-mbr ${isolinuxFile}`;
|
|
1737
1739
|
}
|
package/dist/classes/tailor.d.ts
CHANGED
|
@@ -40,4 +40,11 @@ export default class Tailor {
|
|
|
40
40
|
* - if find any packages to install, install it
|
|
41
41
|
*/
|
|
42
42
|
packagesInstall(packages: string[], comment?: string, cmd?: string): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @param cmd
|
|
46
|
+
* @param echo
|
|
47
|
+
* @returns
|
|
48
|
+
*/
|
|
49
|
+
tryCheckSuccess(cmd: string, echo: {}): Promise<boolean>;
|
|
43
50
|
}
|
package/dist/classes/tailor.js
CHANGED
|
@@ -433,7 +433,7 @@ export default class Tailor {
|
|
|
433
433
|
cmd = `apk search | awk -F'-[0-9]' '{print $1}' | sort -u`;
|
|
434
434
|
}
|
|
435
435
|
else if (distro.familyId === 'fedora') {
|
|
436
|
-
cmd = `dnf list available | awk '{print $1}' | sed 's/\.[^.]*$//'`;
|
|
436
|
+
cmd = `dnf list --available | awk '{print $1}' | sed 's/\.[^.]*$//'`;
|
|
437
437
|
}
|
|
438
438
|
//available = (await exec(cmd, { capture: true, echo: false, ignore: false })).data.split('\n')
|
|
439
439
|
let available = [];
|
|
@@ -487,30 +487,30 @@ export default class Tailor {
|
|
|
487
487
|
for (let tempts = 1; tempts < limit; tempts++) {
|
|
488
488
|
Utils.titles(step);
|
|
489
489
|
Utils.warning(`tempts ${tempts} of ${limit}`);
|
|
490
|
-
if (await tryCheckSuccess(cmd, this.echo)) {
|
|
490
|
+
if (await this.tryCheckSuccess(cmd, this.echo)) {
|
|
491
491
|
break;
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
497
|
+
/**
|
|
498
|
+
*
|
|
499
|
+
* @param cmd
|
|
500
|
+
* @param echo
|
|
501
|
+
* @returns
|
|
502
|
+
*/
|
|
503
|
+
async tryCheckSuccess(cmd, echo) {
|
|
504
|
+
let success = false;
|
|
505
|
+
try {
|
|
506
|
+
await exec(cmd, echo);
|
|
507
|
+
success = true;
|
|
508
|
+
}
|
|
509
|
+
catch {
|
|
510
|
+
success = false;
|
|
511
|
+
}
|
|
512
|
+
return success;
|
|
512
513
|
}
|
|
513
|
-
return success;
|
|
514
514
|
}
|
|
515
515
|
/**
|
|
516
516
|
*
|
package/dist/classes/utils.js
CHANGED
|
@@ -67,9 +67,8 @@ export default class Utils {
|
|
|
67
67
|
let result = '';
|
|
68
68
|
if (codenameId === 'rolling' || codenameId === '') {
|
|
69
69
|
result = 'egg-of_' + distroId.toLowerCase() + '-';
|
|
70
|
-
if (distroId === 'Alpine') {
|
|
70
|
+
if (distroId === 'Alpine' || distroId === 'Fedora') {
|
|
71
71
|
const releaseId = shx.exec('lsb_release -rs', { silent: true }).stdout.toString().trim();
|
|
72
|
-
//result = 'egg-of_' + distroId.toLowerCase() + '-' +releaseId.substring(0, 4) + '-'
|
|
73
72
|
result = 'egg-of_' + distroId.toLowerCase() + '-' + releaseId.trim() + '-';
|
|
74
73
|
}
|
|
75
74
|
}
|
|
@@ -53,9 +53,10 @@ export default async function information(verbose = false) {
|
|
|
53
53
|
React.createElement(Text, null,
|
|
54
54
|
"root passwd: ",
|
|
55
55
|
React.createElement(Text, { color: "cyan" }, settings.config.root_passwd)))));
|
|
56
|
-
|
|
57
|
-
const
|
|
58
|
-
const
|
|
56
|
+
//let lsb_release = path.resolve(__dirname, '../../script/lsb_release')
|
|
57
|
+
const codenameId = shx.exec(`lsb_release -cs`, { silent: true }).stdout.toString().trim();
|
|
58
|
+
const releaseId = shx.exec(`lsb_release -rs`, { silent: true }).stdout.toString().trim();
|
|
59
|
+
const distroId = shx.exec(`lsb_release -is`, { silent: true }).stdout.toString().trim();
|
|
59
60
|
const Distro = () => (React.createElement(Box, { flexDirection: 'column' },
|
|
60
61
|
React.createElement(Box, { borderStyle: "round", marginRight: 2, flexDirection: 'row' },
|
|
61
62
|
React.createElement(Box, { marginRight: 2 },
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import Utils from '../../classes/utils.js';
|
|
10
10
|
import { exec } from '../../lib/utils.js';
|
|
11
|
+
import fs from 'node:fs';
|
|
12
|
+
import path from 'node:path';
|
|
11
13
|
/**
|
|
12
14
|
*
|
|
13
15
|
* @param this
|
|
@@ -34,4 +36,62 @@ export default async function bootloader() {
|
|
|
34
36
|
catch {
|
|
35
37
|
await Utils.pressKeyToExit(cmd);
|
|
36
38
|
}
|
|
39
|
+
// update boot/loader/entries/
|
|
40
|
+
const pathEntries = path.join(this.installTarget, '/boot/loader/entries/');
|
|
41
|
+
if (fs.existsSync(pathEntries)) {
|
|
42
|
+
const uuid = Utils.uuid(this.devices.root.name);
|
|
43
|
+
const machineId = fs.readFileSync(path.join(this.installTarget, '/etc/machine-id'), 'utf-8').trim();
|
|
44
|
+
await renameLoaderEntries(pathEntries, machineId);
|
|
45
|
+
await updateLoaderEntries(pathEntries, uuid);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @param directoryPath
|
|
51
|
+
* @param machineId
|
|
52
|
+
*/
|
|
53
|
+
async function renameLoaderEntries(directoryPath, machineId) {
|
|
54
|
+
const files = fs.readdirSync(directoryPath);
|
|
55
|
+
if (files.length > 0) {
|
|
56
|
+
for (const file of files) {
|
|
57
|
+
const oldPath = path.join(directoryPath, file);
|
|
58
|
+
let current = file.substring(32);
|
|
59
|
+
current = machineId + current;
|
|
60
|
+
const newPath = path.join(directoryPath, current);
|
|
61
|
+
await exec(`mv ${oldPath} ${newPath}`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @param directoryPath
|
|
68
|
+
* @param newUUID
|
|
69
|
+
*/
|
|
70
|
+
async function updateLoaderEntries(directoryPath, newUUID) {
|
|
71
|
+
const files = fs.readdirSync(directoryPath);
|
|
72
|
+
if (files.length > 0) {
|
|
73
|
+
for (const file of files) {
|
|
74
|
+
console.log(file);
|
|
75
|
+
const filePath = path.join(directoryPath, file);
|
|
76
|
+
console.log(`entry: ${filePath}`);
|
|
77
|
+
let source = fs.readFileSync(filePath, 'utf8');
|
|
78
|
+
let lines = source.split('\n');
|
|
79
|
+
let content = '';
|
|
80
|
+
for (let line of lines) {
|
|
81
|
+
if (line.includes('UUID=')) {
|
|
82
|
+
const at = line.indexOf('UUID=');
|
|
83
|
+
const p1 = line.substring(0, at + 5);
|
|
84
|
+
const p2 = newUUID;
|
|
85
|
+
const p3 = line.substring(at + 5 + 36);
|
|
86
|
+
console.log("Orig: " + line);
|
|
87
|
+
console.log("p1: " + p1);
|
|
88
|
+
console.log("p2: " + p2);
|
|
89
|
+
console.log("p3: " + p3);
|
|
90
|
+
line = p1 + p2 + p3;
|
|
91
|
+
}
|
|
92
|
+
content += line + '\n';
|
|
93
|
+
}
|
|
94
|
+
fs.writeFileSync(filePath, content);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
37
97
|
}
|
|
@@ -19,12 +19,18 @@ export default async function machineId() {
|
|
|
19
19
|
if (fs.existsSync(file)) {
|
|
20
20
|
await exec(`rm ${file} ${this.toNull}`, this.echo);
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* machine/id always new now
|
|
24
|
+
*/
|
|
25
|
+
await exec(`dbus-uuidgen --ensure=${this.installTarget}/var/lib/dbus/machine-id ${this.toNull}`);
|
|
26
|
+
await exec(`cp ${this.installTarget}/var/lib/dbus/machine-id ${this.installTarget}/etc/machine-id`);
|
|
27
|
+
/*
|
|
22
28
|
// On Alpine, we need to create the machine-id file
|
|
23
29
|
if (this.distro.familyId === 'alpine') {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
await exec(`touch ${file} ${this.toNull}`);
|
|
30
|
+
await exec(`dbus-uuidgen --ensure=${this.installTarget}/var/lib/dbus/machine-id ${this.toNull}`)
|
|
31
|
+
await exec(`cp ${this.installTarget}/var/lib/dbus/machine-id ${this.installTarget}/etc/machine-id`)
|
|
32
|
+
} else {
|
|
33
|
+
await exec(`touch ${file} ${this.toNull}`)
|
|
29
34
|
}
|
|
35
|
+
*/
|
|
30
36
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "penguins-eggs",
|
|
3
3
|
"shortName": "eggs",
|
|
4
4
|
"description": "A remaster system tool, compatible with Arch, Debian, Devuan, Ubuntu and others",
|
|
5
|
-
"version": "10.0.
|
|
5
|
+
"version": "10.0.49",
|
|
6
6
|
"author": "Piero Proietti",
|
|
7
7
|
"bin": {
|
|
8
8
|
"eggs": "./bin/run.js"
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"eslint-config-oclif-typescript": "^3.1.12",
|
|
53
53
|
"eslint-config-prettier": "^9.1.0",
|
|
54
54
|
"mocha": "^10.8.1",
|
|
55
|
-
"oclif": "^4.15.
|
|
55
|
+
"oclif": "^4.15.20",
|
|
56
56
|
"perrisbrewery": "^10.0.2",
|
|
57
57
|
"prettier": "^3.3.3",
|
|
58
58
|
"shx": "^0.3.4",
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
# SPDX-FileCopyrightText: 2021-2022 Gioele Barabucci
|
|
4
|
+
# SPDX-License-Identifier: ISC
|
|
5
|
+
|
|
6
|
+
set -eu
|
|
7
|
+
|
|
8
|
+
export LC_ALL="C.UTF-8"
|
|
9
|
+
|
|
10
|
+
help () {
|
|
11
|
+
cat <<-EOD
|
|
12
|
+
Usage: lsb_release [options]
|
|
13
|
+
|
|
14
|
+
Options:
|
|
15
|
+
-h, --help show this help message and exit
|
|
16
|
+
-v, --version show LSB modules this system supports
|
|
17
|
+
-i, --id show distributor ID
|
|
18
|
+
-d, --description show description of this distribution
|
|
19
|
+
-r, --release show release number of this distribution
|
|
20
|
+
-c, --codename show code name of this distribution
|
|
21
|
+
-a, --all show all of the above information
|
|
22
|
+
-s, --short show requested information in short format
|
|
23
|
+
EOD
|
|
24
|
+
exit
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
show_id=false
|
|
28
|
+
show_desc=false
|
|
29
|
+
show_release=false
|
|
30
|
+
show_codename=false
|
|
31
|
+
short_format=false
|
|
32
|
+
|
|
33
|
+
options=$(getopt --name lsb_release -o hvidrcas -l help,version,id,description,release,codename,all,short -- "$@") || exit 2
|
|
34
|
+
eval set -- "$options"
|
|
35
|
+
while [ $# -gt 0 ] ; do
|
|
36
|
+
case "$1" in
|
|
37
|
+
-h|--help) help ;;
|
|
38
|
+
-v|--version) ;;
|
|
39
|
+
-i|--id) show_id=true ;;
|
|
40
|
+
-d|--description) show_desc=true ;;
|
|
41
|
+
-r|--release) show_release=true ;;
|
|
42
|
+
-c|--codename) show_codename=true ;;
|
|
43
|
+
-a|--all) show_id=true ; show_desc=true ; show_release=true ; show_codename=true ;;
|
|
44
|
+
-s|--short) short_format=true ;;
|
|
45
|
+
*) break ;;
|
|
46
|
+
esac
|
|
47
|
+
shift
|
|
48
|
+
done
|
|
49
|
+
|
|
50
|
+
display_line () {
|
|
51
|
+
label="$1"
|
|
52
|
+
value="$2"
|
|
53
|
+
|
|
54
|
+
if $short_format ; then
|
|
55
|
+
printf "%s\n" "$value"
|
|
56
|
+
else
|
|
57
|
+
printf "%s:\t%s\n" "$label" "$value"
|
|
58
|
+
fi
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
# Load release info from standard identification data files
|
|
62
|
+
[ -f /usr/lib/os-release ] && os_release=/usr/lib/os-release
|
|
63
|
+
[ -f /etc/os-release ] && os_release=/etc/os-release
|
|
64
|
+
[ "${LSB_OS_RELEASE-x}" != "x" ] && [ -f "$LSB_OS_RELEASE" ] && os_release="$LSB_OS_RELEASE"
|
|
65
|
+
[ "${os_release-x}" != "x" ] && . "$os_release"
|
|
66
|
+
|
|
67
|
+
# Mimic the output of Debian's Python-based lsb_release
|
|
68
|
+
# Capitalize ID
|
|
69
|
+
: "${ID=}"
|
|
70
|
+
ID="$(printf "%s" "$ID" | cut -c1 | tr '[:lower:]' '[:upper:]')$(printf "%s" "$ID" | cut -c2-)"
|
|
71
|
+
# Use NAME if set and different from ID only in capitalization.
|
|
72
|
+
if [ "${NAME-x}" != "x" ] ; then
|
|
73
|
+
lower_case_id=$(printf "%s" "$ID" | tr '[:upper:]' '[:lower:]')
|
|
74
|
+
lower_case_name=$(printf "%s" "$NAME" | tr '[:upper:]' '[:lower:]')
|
|
75
|
+
if [ "${lower_case_id}" = "${lower_case_name}" ] ; then
|
|
76
|
+
ID="$NAME"
|
|
77
|
+
fi
|
|
78
|
+
fi
|
|
79
|
+
|
|
80
|
+
# Generate minimal standard-conform output (if stdout is a TTY).
|
|
81
|
+
[ -t 1 ] && echo "No LSB modules are available." >& 2
|
|
82
|
+
|
|
83
|
+
if $show_id ; then
|
|
84
|
+
display_line "Distributor ID" "${ID:-n/a}"
|
|
85
|
+
fi
|
|
86
|
+
|
|
87
|
+
if $show_desc ; then
|
|
88
|
+
display_line "Description" "${PRETTY_NAME:-n/a}"
|
|
89
|
+
fi
|
|
90
|
+
|
|
91
|
+
if $show_release ; then
|
|
92
|
+
display_line "Release" "${VERSION_ID:-n/a}"
|
|
93
|
+
fi
|
|
94
|
+
|
|
95
|
+
if $show_codename ; then
|
|
96
|
+
display_line "Codename" "${VERSION_CODENAME:-n/a}"
|
|
97
|
+
fi
|
|
Binary file
|