penguins-eggs 10.0.19 → 10.0.20

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.
@@ -1461,5 +1461,5 @@
1461
1461
  ]
1462
1462
  }
1463
1463
  },
1464
- "version": "10.0.19"
1464
+ "version": "10.0.20"
1465
1465
  }
package/README.md CHANGED
@@ -486,7 +486,7 @@ EXAMPLES
486
486
  $ eggs adapt
487
487
  ```
488
488
 
489
- _See code: [src/commands/adapt.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.19/src/commands/adapt.ts)_
489
+ _See code: [src/commands/adapt.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.20/src/commands/adapt.ts)_
490
490
 
491
491
  ## `eggs analyze`
492
492
 
@@ -507,7 +507,7 @@ EXAMPLES
507
507
  sudo eggs analyze
508
508
  ```
509
509
 
510
- _See code: [src/commands/analyze.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.19/src/commands/analyze.ts)_
510
+ _See code: [src/commands/analyze.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.20/src/commands/analyze.ts)_
511
511
 
512
512
  ## `eggs autocomplete [SHELL]`
513
513
 
@@ -538,7 +538,7 @@ EXAMPLES
538
538
  $ eggs autocomplete --refresh-cache
539
539
  ```
540
540
 
541
- _See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v3.1.7/src/commands/autocomplete/index.ts)_
541
+ _See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v3.1.8/src/commands/autocomplete/index.ts)_
542
542
 
543
543
  ## `eggs calamares`
544
544
 
@@ -571,7 +571,7 @@ EXAMPLES
571
571
  sudo eggs calamares --remove
572
572
  ```
573
573
 
574
- _See code: [src/commands/calamares.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.19/src/commands/calamares.ts)_
574
+ _See code: [src/commands/calamares.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.20/src/commands/calamares.ts)_
575
575
 
576
576
  ## `eggs config`
577
577
 
@@ -598,7 +598,7 @@ EXAMPLES
598
598
  sudo eggs config --clean --nointeractive
599
599
  ```
600
600
 
601
- _See code: [src/commands/config.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.19/src/commands/config.ts)_
601
+ _See code: [src/commands/config.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.20/src/commands/config.ts)_
602
602
 
603
603
  ## `eggs cuckoo`
604
604
 
@@ -618,7 +618,7 @@ EXAMPLES
618
618
  sudo eggs cuckoo
619
619
  ```
620
620
 
621
- _See code: [src/commands/cuckoo.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.19/src/commands/cuckoo.ts)_
621
+ _See code: [src/commands/cuckoo.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.20/src/commands/cuckoo.ts)_
622
622
 
623
623
  ## `eggs dad`
624
624
 
@@ -646,7 +646,7 @@ EXAMPLES
646
646
  sudo dad --default
647
647
  ```
648
648
 
649
- _See code: [src/commands/dad.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.19/src/commands/dad.ts)_
649
+ _See code: [src/commands/dad.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.20/src/commands/dad.ts)_
650
650
 
651
651
  ## `eggs export deb`
652
652
 
@@ -673,7 +673,7 @@ EXAMPLES
673
673
  $ eggs export deb --all
674
674
  ```
675
675
 
676
- _See code: [src/commands/export/deb.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.19/src/commands/export/deb.ts)_
676
+ _See code: [src/commands/export/deb.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.20/src/commands/export/deb.ts)_
677
677
 
678
678
  ## `eggs export iso`
679
679
 
@@ -698,7 +698,7 @@ EXAMPLES
698
698
  $ eggs export iso --clean
699
699
  ```
700
700
 
701
- _See code: [src/commands/export/iso.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.19/src/commands/export/iso.ts)_
701
+ _See code: [src/commands/export/iso.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.20/src/commands/export/iso.ts)_
702
702
 
703
703
  ## `eggs help [COMMAND]`
704
704
 
@@ -759,7 +759,7 @@ EXAMPLES
759
759
  sudo eggs install --chroot
760
760
  ```
761
761
 
762
- _See code: [src/commands/install.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.19/src/commands/install.ts)_
762
+ _See code: [src/commands/install.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.20/src/commands/install.ts)_
763
763
 
764
764
  ## `eggs kill`
765
765
 
@@ -782,7 +782,7 @@ EXAMPLES
782
782
  sudo eggs kill
783
783
  ```
784
784
 
785
- _See code: [src/commands/kill.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.19/src/commands/kill.ts)_
785
+ _See code: [src/commands/kill.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.20/src/commands/kill.ts)_
786
786
 
787
787
  ## `eggs krill`
788
788
 
@@ -841,7 +841,7 @@ EXAMPLES
841
841
  $ eggs mom
842
842
  ```
843
843
 
844
- _See code: [src/commands/mom.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.19/src/commands/mom.ts)_
844
+ _See code: [src/commands/mom.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.20/src/commands/mom.ts)_
845
845
 
846
846
  ## `eggs produce`
847
847
 
@@ -898,7 +898,7 @@ EXAMPLES
898
898
  sudo eggs produce --excludes home # exclude ~/*
899
899
  ```
900
900
 
901
- _See code: [src/commands/produce.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.19/src/commands/produce.ts)_
901
+ _See code: [src/commands/produce.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.20/src/commands/produce.ts)_
902
902
 
903
903
  ## `eggs status`
904
904
 
@@ -919,7 +919,7 @@ EXAMPLES
919
919
  $ eggs status
920
920
  ```
921
921
 
922
- _See code: [src/commands/status.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.19/src/commands/status.ts)_
922
+ _See code: [src/commands/status.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.20/src/commands/status.ts)_
923
923
 
924
924
  ## `eggs syncfrom`
925
925
 
@@ -945,7 +945,7 @@ EXAMPLES
945
945
  sudo eggs syncfrom --file /path/to/luks-volume
946
946
  ```
947
947
 
948
- _See code: [src/commands/syncfrom.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.19/src/commands/syncfrom.ts)_
948
+ _See code: [src/commands/syncfrom.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.20/src/commands/syncfrom.ts)_
949
949
 
950
950
  ## `eggs syncto`
951
951
 
@@ -972,7 +972,7 @@ EXAMPLES
972
972
  sudo eggs syncto --excludes
973
973
  ```
974
974
 
975
- _See code: [src/commands/syncto.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.19/src/commands/syncto.ts)_
975
+ _See code: [src/commands/syncto.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.20/src/commands/syncto.ts)_
976
976
 
977
977
  ## `eggs tools clean`
978
978
 
@@ -994,7 +994,7 @@ EXAMPLES
994
994
  sudo eggs tools clean
995
995
  ```
996
996
 
997
- _See code: [src/commands/tools/clean.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.19/src/commands/tools/clean.ts)_
997
+ _See code: [src/commands/tools/clean.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.20/src/commands/tools/clean.ts)_
998
998
 
999
999
  ## `eggs tools ppa`
1000
1000
 
@@ -1020,7 +1020,7 @@ EXAMPLES
1020
1020
  sudo eggs tools ppa --remove
1021
1021
  ```
1022
1022
 
1023
- _See code: [src/commands/tools/ppa.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.19/src/commands/tools/ppa.ts)_
1023
+ _See code: [src/commands/tools/ppa.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.20/src/commands/tools/ppa.ts)_
1024
1024
 
1025
1025
  ## `eggs tools skel`
1026
1026
 
@@ -1044,7 +1044,7 @@ EXAMPLES
1044
1044
  sudo eggs tools skel --user user-to-be-copied
1045
1045
  ```
1046
1046
 
1047
- _See code: [src/commands/tools/skel.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.19/src/commands/tools/skel.ts)_
1047
+ _See code: [src/commands/tools/skel.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.20/src/commands/tools/skel.ts)_
1048
1048
 
1049
1049
  ## `eggs tools stat`
1050
1050
 
@@ -1070,7 +1070,7 @@ EXAMPLES
1070
1070
  $ eggs tools stat --year
1071
1071
  ```
1072
1072
 
1073
- _See code: [src/commands/tools/stat.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.19/src/commands/tools/stat.ts)_
1073
+ _See code: [src/commands/tools/stat.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.20/src/commands/tools/stat.ts)_
1074
1074
 
1075
1075
  ## `eggs tools yolk`
1076
1076
 
@@ -1091,7 +1091,7 @@ EXAMPLES
1091
1091
  sudo eggs tools yolk
1092
1092
  ```
1093
1093
 
1094
- _See code: [src/commands/tools/yolk.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.19/src/commands/tools/yolk.ts)_
1094
+ _See code: [src/commands/tools/yolk.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.20/src/commands/tools/yolk.ts)_
1095
1095
 
1096
1096
  ## `eggs update`
1097
1097
 
@@ -1112,7 +1112,7 @@ EXAMPLES
1112
1112
  $ eggs update
1113
1113
  ```
1114
1114
 
1115
- _See code: [src/commands/update.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.19/src/commands/update.ts)_
1115
+ _See code: [src/commands/update.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.20/src/commands/update.ts)_
1116
1116
 
1117
1117
  ## `eggs version`
1118
1118
 
@@ -1158,7 +1158,7 @@ EXAMPLES
1158
1158
  $ eggs wardrobe get your-wardrobe
1159
1159
  ```
1160
1160
 
1161
- _See code: [src/commands/wardrobe/get.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.19/src/commands/wardrobe/get.ts)_
1161
+ _See code: [src/commands/wardrobe/get.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.20/src/commands/wardrobe/get.ts)_
1162
1162
 
1163
1163
  ## `eggs wardrobe list [REPO]`
1164
1164
 
@@ -1187,7 +1187,7 @@ EXAMPLES
1187
1187
  $ eggs wardrobe list --distro arch
1188
1188
  ```
1189
1189
 
1190
- _See code: [src/commands/wardrobe/list.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.19/src/commands/wardrobe/list.ts)_
1190
+ _See code: [src/commands/wardrobe/list.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.20/src/commands/wardrobe/list.ts)_
1191
1191
 
1192
1192
  ## `eggs wardrobe show [REPO]`
1193
1193
 
@@ -1217,7 +1217,7 @@ EXAMPLES
1217
1217
  $ eggs wardrobe show accessories/
1218
1218
  ```
1219
1219
 
1220
- _See code: [src/commands/wardrobe/show.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.19/src/commands/wardrobe/show.ts)_
1220
+ _See code: [src/commands/wardrobe/show.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.20/src/commands/wardrobe/show.ts)_
1221
1221
 
1222
1222
  ## `eggs wardrobe wear [REPO]`
1223
1223
 
@@ -1248,7 +1248,7 @@ EXAMPLES
1248
1248
  sudo eggs wardrobe wear wagtail/waydroid
1249
1249
  ```
1250
1250
 
1251
- _See code: [src/commands/wardrobe/wear.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.19/src/commands/wardrobe/wear.ts)_
1251
+ _See code: [src/commands/wardrobe/wear.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.20/src/commands/wardrobe/wear.ts)_
1252
1252
  <!-- commandsstop -->
1253
1253
 
1254
1254
  # penGUI
@@ -102,191 +102,202 @@ class Distro {
102
102
  this.releaseLike = 'unstable';
103
103
  }
104
104
  /**
105
- * Analisi: codenameId
105
+ * Analize distroId
106
106
  */
107
- switch (this.codenameId) {
108
- case 'jessie': {
109
- // Debian 8 jessie
110
- this.distroLike = 'Debian';
111
- this.codenameLikeId = 'jessie';
112
- this.liveMediumPath = '/lib/live/mount/medium/';
113
- this.isCalamaresAvailable = false;
114
- break;
115
- }
116
- case 'stretch': {
117
- // Debian 9 stretch
118
- this.distroLike = 'Debian';
119
- this.codenameLikeId = 'stretch';
120
- this.liveMediumPath = '/lib/live/mount/medium/';
121
- this.isCalamaresAvailable = false;
122
- break;
123
- }
124
- case 'buster': {
125
- // Debian 10 buster
126
- this.distroLike = 'Debian';
127
- this.codenameLikeId = 'buster';
128
- break;
129
- }
130
- case 'bullseye': {
131
- // Debian 11 bullseye
132
- this.distroLike = 'Debian';
133
- this.codenameLikeId = 'bullseye';
134
- break;
135
- }
136
- case 'bookworm': {
137
- // Debian 12 bookworm
138
- this.distroLike = 'Debian';
139
- this.codenameLikeId = 'bookworm';
140
- break;
141
- }
142
- case 'trixie': {
143
- // Debian 13 trixie
144
- this.distroLike = 'Debian';
145
- this.codenameLikeId = 'trixie';
146
- break;
147
- }
148
- case 'beowulf': {
149
- // Devuab 3 beowulf
150
- this.distroLike = 'Devuan';
151
- this.codenameLikeId = 'beowulf';
152
- break;
153
- }
154
- case 'chimaera': {
155
- // Devuab 4 chimaera
156
- this.distroLike = 'Devuan';
157
- this.codenameLikeId = 'chimaera';
158
- break;
159
- }
160
- case 'daedalus': {
161
- // Devuan 5 daedalus
162
- this.distroLike = 'Devuan';
163
- this.codenameLikeId = 'daedalus';
164
- break;
165
- }
166
- /**
167
- * Ubuntu LTS + actual
168
- */
169
- case 'bionic': {
170
- // Ubuntu 18.04 bionic LTS eol aprile 2023
171
- this.distroLike = 'Ubuntu';
172
- this.codenameLikeId = 'bionic';
173
- this.liveMediumPath = '/lib/live/mount/medium/';
174
- break;
175
- }
176
- case 'focal': {
177
- // Ubuntu 20.04 focal LTS
178
- this.distroLike = 'Ubuntu';
179
- this.codenameLikeId = 'focal';
180
- break;
181
- }
182
- case 'jammy': {
183
- // Ubuntu 22.04 jammy LTS
184
- this.distroLike = 'Ubuntu';
185
- this.codenameLikeId = 'jammy';
186
- break;
187
- }
188
- case 'noble': {
189
- // Ubuntu 24.04 noble LTS
190
- this.distroLike = 'Ubuntu';
191
- this.codenameLikeId = 'noble';
192
- break;
193
- }
194
- case 'devel': {
195
- // Ubuntu rhino
196
- this.distroLike = 'Ubuntu';
197
- this.codenameLikeId = 'devel';
198
- break;
199
- }
107
+ if (this.distroId === 'Alpine') {
108
+ this.familyId = 'alpine';
109
+ this.distroLike = 'Alpine';
110
+ this.codenameId = 'rolling'; // questo viene rimosso dal nome
111
+ this.codenameLikeId = 'alpine-rolling';
112
+ this.liveMediumPath = '/.modloop/'; // ? è il mount della root su cd di installatione
113
+ this.squashfs = `live/filesystem.squashfs`;
114
+ this.syslinuxPath = '/usr/share/syslinux/'; //correct
115
+ this.pxelinuxPath = this.syslinuxPath;
116
+ this.usrLibPath = '/usr/lib/';
117
+ this.memdiskPath = this.syslinuxPath;
118
+ this.isolinuxPath = this.syslinuxPath;
119
+ }
120
+ else if (this.distroId === 'Fedora') {
121
+ this.familyId = 'fedora';
122
+ this.distroLike = 'Fedora';
123
+ this.codenameId = 'rolling';
124
+ this.codenameLikeId = '40';
125
+ this.liveMediumPath = '/run/install/repo/'; // ? è il mount della root su cd di installatione
126
+ this.squashfs = `live/filesystem.squashfs`;
127
+ this.syslinuxPath = '/usr/share/syslinux/';
128
+ this.pxelinuxPath = this.syslinuxPath;
129
+ this.usrLibPath = '/usr/lib/';
130
+ this.memdiskPath = this.syslinuxPath;
131
+ this.isolinuxPath = this.syslinuxPath;
132
+ }
133
+ else {
200
134
  /**
201
- * Arch Linux/Garuda
135
+ * Arch/Debian/Devuan/Manjaro and Ubuntu
202
136
  */
203
- case 'Spizaetus':
204
- case 'n/a':
205
- case 'rolling': {
206
- if (this.distroId === "Alpine") {
207
- // Alpine
208
- this.familyId = 'alpine';
209
- this.distroLike = 'Alpine';
210
- this.codenameId = 'rolling'; // questo viene rimosso dal nome
211
- this.codenameLikeId = 'alpine-rolling';
212
- this.liveMediumPath = '/.modloop/'; // ? è il mount della root su cd di installatione
213
- this.squashfs = `to/define/filestem.squashfs`;
137
+ switch (this.codenameId) {
138
+ case 'jessie': {
139
+ // Debian 8 jessie
140
+ this.distroLike = 'Debian';
141
+ this.codenameLikeId = 'jessie';
142
+ this.liveMediumPath = '/lib/live/mount/medium/';
143
+ this.isCalamaresAvailable = false;
144
+ break;
145
+ }
146
+ case 'stretch': {
147
+ // Debian 9 stretch
148
+ this.distroLike = 'Debian';
149
+ this.codenameLikeId = 'stretch';
150
+ this.liveMediumPath = '/lib/live/mount/medium/';
151
+ this.isCalamaresAvailable = false;
152
+ break;
153
+ }
154
+ case 'buster': {
155
+ // Debian 10 buster
156
+ this.distroLike = 'Debian';
157
+ this.codenameLikeId = 'buster';
158
+ break;
159
+ }
160
+ case 'bullseye': {
161
+ // Debian 11 bullseye
162
+ this.distroLike = 'Debian';
163
+ this.codenameLikeId = 'bullseye';
164
+ break;
165
+ }
166
+ case 'bookworm': {
167
+ // Debian 12 bookworm
168
+ this.distroLike = 'Debian';
169
+ this.codenameLikeId = 'bookworm';
170
+ break;
171
+ }
172
+ case 'trixie': {
173
+ // Debian 13 trixie
174
+ this.distroLike = 'Debian';
175
+ this.codenameLikeId = 'trixie';
176
+ break;
177
+ }
178
+ case 'beowulf': {
179
+ // Devuab 3 beowulf
180
+ this.distroLike = 'Devuan';
181
+ this.codenameLikeId = 'beowulf';
182
+ break;
183
+ }
184
+ case 'chimaera': {
185
+ // Devuab 4 chimaera
186
+ this.distroLike = 'Devuan';
187
+ this.codenameLikeId = 'chimaera';
188
+ break;
189
+ }
190
+ case 'daedalus': {
191
+ // Devuan 5 daedalus
192
+ this.distroLike = 'Devuan';
193
+ this.codenameLikeId = 'daedalus';
194
+ break;
214
195
  }
215
- else {
216
- // Arch, ArcoLinux, BlendOS, EndeavourOS, Garuda, RebornOS
196
+ /**
197
+ * Ubuntu LTS + actual
198
+ */
199
+ case 'bionic': {
200
+ // Ubuntu 18.04 bionic LTS eol aprile 2023
201
+ this.distroLike = 'Ubuntu';
202
+ this.codenameLikeId = 'bionic';
203
+ this.liveMediumPath = '/lib/live/mount/medium/';
204
+ break;
205
+ }
206
+ case 'focal': {
207
+ // Ubuntu 20.04 focal LTS
208
+ this.distroLike = 'Ubuntu';
209
+ this.codenameLikeId = 'focal';
210
+ break;
211
+ }
212
+ case 'jammy': {
213
+ // Ubuntu 22.04 jammy LTS
214
+ this.distroLike = 'Ubuntu';
215
+ this.codenameLikeId = 'jammy';
216
+ break;
217
+ }
218
+ case 'noble': {
219
+ // Ubuntu 24.04 noble LTS
220
+ this.distroLike = 'Ubuntu';
221
+ this.codenameLikeId = 'noble';
222
+ break;
223
+ }
224
+ case 'devel': {
225
+ // Ubuntu rhino
226
+ this.distroLike = 'Ubuntu';
227
+ this.codenameLikeId = 'devel';
228
+ break;
229
+ }
230
+ /**
231
+ * Arch Linux/Garuda
232
+ */
233
+ case 'Spizaetus':
234
+ case 'n/a':
235
+ case 'rolling': {
217
236
  this.familyId = 'archlinux';
218
237
  this.distroLike = 'Arch';
219
238
  this.codenameId = 'rolling';
220
239
  this.codenameLikeId = 'rolling';
221
240
  this.liveMediumPath = '/run/archiso/bootmnt/';
222
241
  this.squashfs = `arch/x86_64/airootfs.sfs`;
242
+ break;
223
243
  }
224
- break;
225
- }
226
- default: {
227
- /**
228
- * patch per Roy VERIFICARE
229
- */
230
- let found = false;
231
- let file = path.resolve(__dirname, '../../conf/derivatives.yaml');
232
- if (fs.existsSync('/etc/penguins-eggs.d/derivatives.yaml')) {
233
- file = '/etc/penguins-eggs.d/derivatives.yaml';
234
- }
235
- const content = fs.readFileSync(file, 'utf8');
236
- const distros = yaml.load(content);
237
- for (const distro of distros) {
238
- if (distro.ids !== undefined) {
239
- for (let n = 0; n < distro.ids.length; n++) {
240
- if (this.codenameId === distro.ids[n]) {
241
- found = true;
242
- this.distroLike = distro.distroLike;
243
- this.codenameLikeId = distro.id;
244
- this.familyId = distro.family;
244
+ default: {
245
+ /**
246
+ * patch per Roy VERIFICARE
247
+ */
248
+ let found = false;
249
+ let file = path.resolve(__dirname, '../../conf/derivatives.yaml');
250
+ if (fs.existsSync('/etc/penguins-eggs.d/derivatives.yaml')) {
251
+ file = '/etc/penguins-eggs.d/derivatives.yaml';
252
+ }
253
+ const content = fs.readFileSync(file, 'utf8');
254
+ const distros = yaml.load(content);
255
+ for (const distro of distros) {
256
+ if (distro.ids !== undefined) {
257
+ for (let n = 0; n < distro.ids.length; n++) {
258
+ if (this.codenameId === distro.ids[n]) {
259
+ found = true;
260
+ this.distroLike = distro.distroLike;
261
+ this.codenameLikeId = distro.id;
262
+ this.familyId = distro.family;
263
+ }
245
264
  }
246
265
  }
247
266
  }
248
- }
249
- if (!found) {
250
- console.log(`This distro ${this.distroId}/${this.codenameId} is not yet recognized!`);
251
- console.log('');
252
- console.log('You can edit /usr/lib/penguins-eggs/conf/derivatives.yaml to add it -');
253
- console.log('after that - run: sudo eggs dad -d to re-configure eggs.');
254
- console.log('If you can create your new iso, you can contribute to the project');
255
- console.log('by suggesting your modification.');
256
- process.exit(0);
267
+ if (!found) {
268
+ console.log(`This distro ${this.distroId}/${this.codenameId} is not yet recognized!`);
269
+ console.log('');
270
+ console.log('You can edit /usr/lib/penguins-eggs/conf/derivatives.yaml to add it -');
271
+ console.log('after that - run: sudo eggs dad -d to re-configure eggs.');
272
+ console.log('If you can create your new iso, you can contribute to the project');
273
+ console.log('by suggesting your modification.');
274
+ process.exit(0);
275
+ }
257
276
  }
258
277
  }
278
+ /**
279
+ * setting paths: syslinux, isolinux, usrLibPath
280
+ */
281
+ switch (this.familyId) {
282
+ case 'debian': {
283
+ this.isolinuxPath = '/usr/lib/ISOLINUX/';
284
+ this.syslinuxPath = '/usr/lib/syslinux/modules/bios/';
285
+ this.pxelinuxPath = '/usr/lib/PXELINUX/';
286
+ this.memdiskPath = '/usr/lib/syslinux/';
287
+ this.usrLibPath = '/usr/lib/' + Utils.usrLibPath();
288
+ break;
289
+ }
290
+ case 'archlinux': {
291
+ this.syslinuxPath = '/usr/lib/syslinux/bios/';
292
+ this.pxelinuxPath = this.syslinuxPath;
293
+ this.usrLibPath = '/usr/lib/';
294
+ this.memdiskPath = this.syslinuxPath;
295
+ this.isolinuxPath = this.syslinuxPath;
296
+ break;
297
+ }
298
+ // No default
299
+ } // Fine analisi codenameId
259
300
  }
260
- /**
261
- * setting paths: syslinux, isolinux, usrLibPath
262
- */
263
- switch (this.familyId) {
264
- case 'debian': {
265
- this.isolinuxPath = '/usr/lib/ISOLINUX/';
266
- this.syslinuxPath = '/usr/lib/syslinux/modules/bios/';
267
- this.pxelinuxPath = '/usr/lib/PXELINUX/';
268
- this.memdiskPath = '/usr/lib/syslinux/';
269
- this.usrLibPath = '/usr/lib/' + Utils.usrLibPath();
270
- break;
271
- }
272
- case 'archlinux': {
273
- this.syslinuxPath = '/usr/lib/syslinux/bios/';
274
- this.pxelinuxPath = this.syslinuxPath;
275
- this.usrLibPath = '/usr/lib/';
276
- this.memdiskPath = this.syslinuxPath;
277
- this.isolinuxPath = this.syslinuxPath;
278
- break;
279
- }
280
- case 'alpine': {
281
- this.syslinuxPath = '/usr/share/syslinux/'; //correct
282
- this.pxelinuxPath = this.syslinuxPath;
283
- this.usrLibPath = '/usr/lib/';
284
- this.memdiskPath = this.syslinuxPath;
285
- this.isolinuxPath = this.syslinuxPath;
286
- break;
287
- }
288
- // No default
289
- } // Fine analisi codenameId
290
301
  /**
291
302
  * if lsb-release exists
292
303
  */
@@ -24,7 +24,7 @@ export default class Fedora {
24
24
  await exec(`dnf install ${this.packs4calamares.join(' ')}`, echo);
25
25
  }
26
26
  catch {
27
- Utils.error(`Fedora.calamaresInstall() pacman -Sy ${this.packs4calamares.join(' ')}`); // + e.error)
27
+ Utils.error(`fedora.calamaresInstall()`);
28
28
  }
29
29
  }
30
30
  /**
@@ -42,8 +42,7 @@ export default class Fedora {
42
42
  if (fs.existsSync('/etc/calamares')) {
43
43
  await exec('rm /etc/calamares -rf', echo);
44
44
  }
45
- // yay???
46
- await exec('yay -Rns calamares', echo);
45
+ await exec('dnf remove calamares', echo);
47
46
  return retVal;
48
47
  }
49
48
  /**
@@ -91,7 +90,6 @@ export default class Fedora {
91
90
  */
92
91
  static packageIsInstalled(packageName) {
93
92
  let installed = false;
94
- // rpm -qa | grep -i nano
95
93
  const cmd = `/usr/bin/dnf list --installed ${packageName}`;
96
94
  const stdout = shx.exec(cmd, { silent: true }).stdout.trim();
97
95
  if (stdout.includes(packageName)) {
@@ -83,18 +83,22 @@ export default class Ovary {
83
83
  */
84
84
  finished(scriptOnly?: boolean): void;
85
85
  /**
86
- * initrdArch()
87
- * necessita di echoYes
86
+ * initrdAlpine()
88
87
  */
89
- initrdArch(): Promise<void>;
88
+ initrdAlpine(): Promise<void>;
89
+ /**
90
+ * initrdFedora()
91
+ */
92
+ initrdFedora(): Promise<void>;
90
93
  /**
91
94
  * initrdArch()
92
95
  * necessita di echoYes
93
96
  */
94
- initrdAlpine(): Promise<void>;
97
+ initrdArch(): Promise<void>;
95
98
  /**
99
+ * initrdDebian()
100
+ * Actually based on live* packages
96
101
  * We must upgrade to initrdCreate for Debian/Ubuntu
97
- * @returns
98
102
  */
99
103
  initrdDebian(verbose?: boolean): Promise<void>;
100
104
  /**
@@ -703,15 +703,28 @@ export default class Ovary {
703
703
  console.log(`Note: format UDF, generated by ${chalk.cyanBright('genisoimage')}`);
704
704
  }
705
705
  }
706
+ /**
707
+ * initrdAlpine()
708
+ */
709
+ async initrdAlpine() {
710
+ Utils.warning(`creating ${path.basename(this.settings.initrdImg)} Alpine on ISO/live`);
711
+ await exec(`cp /boot/initramfs-lts ${this.settings.iso_work}/live/`, this.echo);
712
+ }
713
+ /**
714
+ * initrdFedora()
715
+ */
716
+ async initrdFedora() {
717
+ Utils.warning(`creating ${path.basename(this.settings.initrdImg)} Fedora on ISO/live`);
718
+ await exec(`cp /boot/initramfs-* ${this.settings.iso_work}/live/`, this.echo);
719
+ }
706
720
  /**
707
721
  * initrdArch()
708
722
  * necessita di echoYes
709
723
  */
710
724
  async initrdArch() {
711
- Utils.warning(`creating ${path.basename(this.settings.initrdImg)} on ISO/live`);
712
725
  let initrdImg = Utils.initrdImg();
713
726
  initrdImg = initrdImg.slice(Math.max(0, initrdImg.lastIndexOf('/') + 1));
714
- Utils.warning(`Creating ${initrdImg} in ${this.settings.iso_work}live/`);
727
+ Utils.warning(`creating ${path.basename(this.settings.initrdImg)} ArchLinux on ISO/live`);
715
728
  const { distroId } = this.settings.distro;
716
729
  let fileConf = 'arch';
717
730
  if (isMiso(distroId)) {
@@ -724,26 +737,12 @@ export default class Ovary {
724
737
  await exec(`mkinitcpio -c ${pathConf} -g ${this.settings.iso_work}live/${initrdImg}`, Utils.setEcho(true));
725
738
  }
726
739
  /**
727
- * initrdArch()
728
- * necessita di echoYes
729
- */
730
- async initrdAlpine() {
731
- Utils.warning(`creating ${path.basename(this.settings.initrdImg)} on ISO/live`);
732
- let initrdImg = Utils.initrdImg();
733
- //initrdImg = initrdImg.slice(Math.max(0, initrdImg.lastIndexOf('/') + 1))
734
- Utils.warning(`Creating ${initrdImg} in ${this.settings.iso_work}live/`);
735
- const { distroId } = this.settings.distro;
736
- // da cambiare ...
737
- let fileConf = 'arch';
738
- const pathConf = path.resolve(__dirname, `../../mkinitcpio/${fileConf}/live.conf`);
739
- await exec(`mkinitcpio -c ${pathConf} -g ${this.settings.iso_work}live/${initrdImg}`, Utils.setEcho(true));
740
- }
741
- /**
740
+ * initrdDebian()
741
+ * Actually based on live* packages
742
742
  * We must upgrade to initrdCreate for Debian/Ubuntu
743
- * @returns
744
743
  */
745
744
  async initrdDebian(verbose = false) {
746
- Utils.warning(`creating ${path.basename(this.settings.initrdImg)} on ISO/live`);
745
+ Utils.warning(`creating ${path.basename(this.settings.initrdImg)} Debian/Devuan/Ubuntu on ISO/live`);
747
746
  let isCrypted = false;
748
747
  if (fs.existsSync('/etc/crypttab')) {
749
748
  isCrypted = true;
@@ -1446,15 +1445,21 @@ export default class Ovary {
1446
1445
  await this.isolinux(this.theme);
1447
1446
  await this.kernelCopy();
1448
1447
  /**
1449
- * we need different behaviour on
1450
- * initrd for different familis
1448
+ * we need different initfs
1449
+ * for different families
1451
1450
  */
1452
- if (this.familyId === 'debian') {
1453
- await this.initrdDebian();
1454
- }
1455
- else if (this.familyId === 'archlinux') {
1451
+ if (this.familyId === 'archlinux') {
1456
1452
  await this.initrdArch();
1457
1453
  }
1454
+ else if (this.familyId === 'alpine') {
1455
+ await this.initrdAlpine();
1456
+ }
1457
+ else if (this.familyId === 'fedora') {
1458
+ await this.initrdFedora();
1459
+ }
1460
+ else if (this.familyId === 'debian') {
1461
+ await this.initrdDebian();
1462
+ }
1458
1463
  if (this.settings.config.make_efi) {
1459
1464
  await this.makeEfi(this.theme);
1460
1465
  }
@@ -11,10 +11,10 @@
11
11
  */
12
12
  export default class Utils {
13
13
  /**
14
- * Custom function to sort object keys
15
- * @param obj
16
- * @returns
17
- */
14
+ * Custom function to sort object keys
15
+ * @param obj
16
+ * @returns
17
+ */
18
18
  static sortObjectKeys(obj: {
19
19
  [key: string]: any;
20
20
  }): {
@@ -29,11 +29,10 @@ const __dirname = path.dirname(new URL(import.meta.url).pathname);
29
29
  */
30
30
  export default class Utils {
31
31
  /**
32
- * Custom function to sort object keys
33
- * @param obj
34
- * @returns
35
- */
36
- //
32
+ * Custom function to sort object keys
33
+ * @param obj
34
+ * @returns
35
+ */
37
36
  static sortObjectKeys(obj) {
38
37
  const sorted = {};
39
38
  Object.keys(obj)
@@ -110,14 +109,19 @@ export default class Utils {
110
109
  static vmlinuz() {
111
110
  let distro = new Distro();
112
111
  let vmlinuz = '';
113
- // patch per raspberry arm64
114
112
  // find vmlinuz in /proc/cmdline
115
113
  const cmdline = fs.readFileSync('/proc/cmdline', 'utf8').split(" ");
116
114
  cmdline.forEach(cmd => {
117
115
  if (cmd.includes('BOOT_IMAGE')) {
118
116
  vmlinuz = cmd.substring(cmd.indexOf('=') + 1);
119
- if (!fs.existsSync(vmlinuz) && fs.existsSync(`/boot${vmlinuz}`)) {
120
- vmlinuz = `/boot${vmlinuz}`;
117
+ // patch per fedora BOOT_IMAGE=(hd0,gpt2)/vmlinuz-6.9.9-200.fc40.x86_64
118
+ if (vmlinuz.includes(")")) {
119
+ vmlinuz = cmd.substring(cmd.indexOf(')') + 1);
120
+ }
121
+ if (!fs.existsSync(vmlinuz)) {
122
+ if (fs.existsSync(`/boot/${vmlinuz}`)) {
123
+ vmlinuz = `/boot/${vmlinuz}`;
124
+ }
121
125
  }
122
126
  }
123
127
  });
Binary file
@@ -6,10 +6,10 @@
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1">
7
7
  </head>
8
8
  <body>
9
- <h1>eggs(1) -- the reproductive system of penguins: eggs v10.0.19</h1>
9
+ <h1>eggs(1) -- the reproductive system of penguins: eggs v10.0.20</h1>
10
10
  <h1>SYNOPSIS</h1>
11
11
  <p>Install Debian families (debian/devuan/ubuntu)</p>
12
- <pre><code>$ sudo dpkg -i penguins-eggs_10.0.19-bionic-1_amd64.deb
12
+ <pre><code>$ sudo dpkg -i penguins-eggs_10.0.20-1_i386.deb
13
13
  </code></pre>
14
14
  <p>Install Arch families (Arch, manjaro Linux)</p>
15
15
  <p>Arch from AUR</p>
@@ -30,7 +30,7 @@ $ makepkg -si
30
30
  <h1>USAGE</h1>
31
31
  <pre><code>$ eggs (-v|--version|version)
32
32
 
33
- penguins-eggs/10.0.19
33
+ penguins-eggs/10.0.20
34
34
  $ eggs --help [COMMAND]
35
35
 
36
36
  USAGE
@@ -1,4 +1,4 @@
1
- # Hic sunt leones!
1
+ # Arch families
2
2
 
3
3
  After Debian/Devuan/Ubuntu I decided to bring eggs under Arch and thanx to the collaboration of stefano@manjaro.com we was able to remaster linuxmanjaro since january 2022.
4
4
 
package/package.json CHANGED
@@ -2,15 +2,15 @@
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.19",
5
+ "version": "10.0.20",
6
6
  "author": "Piero Proietti",
7
7
  "bin": {
8
8
  "eggs": "./bin/run.js"
9
9
  },
10
10
  "bugs": "https://github.com/pieroproietti/penguins-eggs/issues",
11
11
  "dependencies": {
12
- "@oclif/core": "^4.0.12",
13
- "@oclif/plugin-autocomplete": "^3.1.7",
12
+ "@oclif/core": "^4.0.13",
13
+ "@oclif/plugin-autocomplete": "^3.1.8",
14
14
  "@oclif/plugin-help": "^6.2.6",
15
15
  "@oclif/plugin-version": "^2.2.8",
16
16
  "axios": "^1.7.2",
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "devDependencies": {
32
32
  "@oclif/prettier-config": "^0.2.1",
33
- "@oclif/test": "^4.0.4",
33
+ "@oclif/test": "^4.0.5",
34
34
  "@types/chai": "^4.3.16",
35
35
  "@types/inquirer": "^9.0.7",
36
36
  "@types/js-yaml": "^4.0.9",
@@ -47,7 +47,7 @@
47
47
  "eslint-config-oclif-typescript": "^3.1.8",
48
48
  "eslint-config-prettier": "^9.1.0",
49
49
  "mocha": "^10.6.0",
50
- "oclif": "^4.14.6",
50
+ "oclif": "^4.14.8",
51
51
  "perrisbrewery": "^10.0.1",
52
52
  "prettier": "^3.3.3",
53
53
  "shx": "^0.3.4",
package/scripts/_eggs CHANGED
@@ -323,7 +323,6 @@ _arguments -S \
323
323
  --theme"[theme for livecd, calamares branding and partitions]:file:_files" \
324
324
  "(-u --unsecure)"{-u,--unsecure}"[/root contents are included on live]" \
325
325
  "(-v --verbose)"{-v,--verbose}"[verbose]" \
326
- "(-U --udf)"{-U,--udf}"[use UDF format on ISO with genisoimage breacking 4.7 G limit]" \
327
326
  "(-y --yolk)"{-y,--yolk}"[force yolk renew]" \
328
327
  --help"[Show help for command]" \
329
328
  "*: :_files" ;;
package/scripts/eggs.bash CHANGED
@@ -23,7 +23,7 @@ install --btrfs --chroot --crypted --domain --halt --help --ip --nointeractive -
23
23
  krill --btrfs --chroot --crypted --domain --halt --help --ip --nointeractive --none --pve --random --small --suspend --unattended --verbose
24
24
  kill --help --isos --nointeractive --verbose
25
25
  mom --help
26
- produce --addons --basename --clone --cryptedclone --excludes --help --links --max --noicon --nointeractive --pendrive --prefix --release --script --standard --theme --unsecure --verbose --udf --yolk
26
+ produce --addons --basename --clone --cryptedclone --excludes --help --links --max --noicon --nointeractive --pendrive --prefix --release --script --standard --theme --unsecure --verbose --yolk
27
27
  status --help --verbose
28
28
  syncfrom --delete --file --help --rootdir --verbose
29
29
  syncto --excludes --file --help --verbose
@@ -1,41 +0,0 @@
1
- /**
2
- * ./src/classes/initrd.ts
3
- * penguins-eggs v.10.0.0 / ecmascript 2020
4
- * author: Piero Proietti
5
- * email: piero.proietti@gmail.com
6
- * license: MIT
7
- */
8
- import { IInitrd } from '../interfaces/index.js';
9
- /**
10
- * initrd
11
- * Controlla e rimuove, se necessario cryptroot, resume
12
- * cryptsetup
13
- */
14
- export default class Initrd {
15
- compression: string;
16
- fsLive: string;
17
- initrdDest: string;
18
- initrdSrc: string;
19
- workDir: string;
20
- constructor(initrdSrc?: string, initrdDest?: string, fsLive?: string);
21
- /**
22
- * Check initrd for cryptroot, resume, cryptsetup.
23
- */
24
- check(): IInitrd;
25
- /**
26
- * clean
27
- */
28
- clean(): void;
29
- /**
30
- * extract
31
- */
32
- extract(initrd?: string, verbose?: boolean): Promise<void>;
33
- /**
34
- * edit
35
- */
36
- private edit;
37
- /**
38
- * rebuild
39
- */
40
- private rebuild;
41
- }
@@ -1,152 +0,0 @@
1
- /**
2
- * ./src/classes/initrd.ts
3
- * penguins-eggs v.10.0.0 / ecmascript 2020
4
- * author: Piero Proietti
5
- * email: piero.proietti@gmail.com
6
- * license: MIT
7
- */
8
- /**
9
- * Schema from "refractasnapshot-10.2.10 (20191218)"
10
- * Copyright: fsmithred@gmail.com 2011-2019
11
- */
12
- // packages
13
- import fs from 'node:fs';
14
- import shx from 'shelljs';
15
- /**
16
- * initrd
17
- * Controlla e rimuove, se necessario cryptroot, resume
18
- * cryptsetup
19
- */
20
- export default class Initrd {
21
- compression = 'gzip';
22
- fsLive = '/home/eggs/ovarium/filesystem';
23
- initrdDest = '/home/eggs/ovarium/iso/live';
24
- initrdSrc = '/initrd.img';
25
- workDir = '/tmp/initrd-extracted';
26
- constructor(initrdSrc = '/initrd.img', initrdDest = '/home/eggs/mnt/ovarium/iso/live/initrd.img', fsLive = '/home/eggs/ovarium/filesystem') {
27
- this.initrdSrc = initrdSrc;
28
- this.initrdDest = initrdDest;
29
- this.fsLive = fsLive;
30
- console.log('sorgente: ' + this.initrdSrc);
31
- console.log('destinazione: ' + this.initrdDest);
32
- console.log('fsLive: ' + this.fsLive);
33
- }
34
- /**
35
- * Check initrd for cryptroot, resume, cryptsetup.
36
- */
37
- check() {
38
- const initrd = {};
39
- const cmdCheck = `lsinitramfs ${this.initrdSrc} | egrep 'conf/conf.d/cryptroot|cryptroot/crypttab|conf/conf.d/resume|conf/conf.d/zz-resume-auto'`;
40
- const check = shx.exec(cmdCheck, { silent: true });
41
- if (check.includes('conf/conf.d/cryptroot')) {
42
- initrd.cryptoroot = true;
43
- }
44
- if (check.includes('cryptroot/crypttab')) {
45
- initrd.crypttab = true;
46
- }
47
- if (check.includes('conf/conf.d/resume')) {
48
- initrd.resume = true;
49
- }
50
- if (check.includes('conf/conf.d/zz-resume-auto')) {
51
- initrd.zz_resume_auto = true;
52
- }
53
- return initrd;
54
- }
55
- /**
56
- * clean
57
- */
58
- clean() {
59
- this.extract();
60
- this.edit();
61
- this.rebuild();
62
- }
63
- /**
64
- * extract
65
- */
66
- async extract(initrd = '/initrd.img', verbose = false) {
67
- let echo = { echo: false, ignore: false };
68
- if (verbose) {
69
- echo = { echo: true, ignore: false };
70
- }
71
- const savedState = process.cwd();
72
- // cancello e ricreo la cartella di lavore
73
- if (fs.existsSync(this.workDir)) {
74
- shx.exec(`rm ${this.workDir} -rf`);
75
- }
76
- shx.mkdir(this.workDir);
77
- process.chdir(this.workDir);
78
- // Verifico il tipo di compressione
79
- const cmd = `file -L ${this.initrdSrc} | egrep -o 'gzip compressed|XZ compressed|cpio archive'`;
80
- const compressionShell = shx.exec(cmd).trimStart().trimEnd();
81
- switch (compressionShell) {
82
- case 'gzip compressed': {
83
- break;
84
- }
85
- case 'xz compressed': {
86
- this.compression = 'xz';
87
- break;
88
- }
89
- case 'cpio compressed': {
90
- this.compression = 'cpio';
91
- break;
92
- }
93
- // No default
94
- }
95
- // Estratto initrd nella cartella di lavoro
96
- console.log('compression: [' + this.compression + ']');
97
- if ((this.compression = 'gzip')) {
98
- shx.exec(`zcat ${initrd} | cpio -i`);
99
- }
100
- else if (this.compression === 'xz') {
101
- shx.exec(`xzcat ${initrd} | cpio -d -i -m`);
102
- }
103
- else if (this.compression === 'cpio') {
104
- shx.exec(`(cpio -i ; zcat | cpio -i) < ${initrd}`);
105
- }
106
- process.chdir(savedState);
107
- }
108
- /**
109
- * edit
110
- */
111
- edit(verbose = true) {
112
- // Analizzo per cryptroot
113
- if (fs.existsSync(`${this.workDir}/conf/conf.d/cryptroot`)) {
114
- console.log('Removing cryptroot');
115
- shx.exec(`rm -f ${this.workDir}/conf/conf.d/cryptroot`);
116
- }
117
- else if (fs.existsSync(`${this.workDir}/cryptroot/crypttab`)) {
118
- console.log('Removing crypttab');
119
- shx.exec(`rm -f ${this.workDir}/cryptroot/crypttab`);
120
- }
121
- // Analizzo per resume
122
- if (fs.existsSync(`${this.workDir}/conf/conf.d/resume`)) {
123
- console.log('Removing resume');
124
- shx.exec(`rm -f ${this.workDir}/conf/conf.d/resume`);
125
- shx.exec(`rm -f ${this.fsLive}/etc/initramfs-tools/conf.d/resume`);
126
- }
127
- else if (`${this.workDir}/conf/conf.d/zz-resume-auto`) {
128
- shx.exec(`rm -f ${this.workDir}/rm -f conf/conf.d/zz-resume-auto`);
129
- shx.exec(`rm -f ${this.fsLive}/etc/initramfs-tools/conf.d/resume`);
130
- }
131
- }
132
- /**
133
- * rebuild
134
- */
135
- rebuild(initrd = '/initrd.img', verbose = true) {
136
- let echo = { echo: false, ignore: false };
137
- if (verbose) {
138
- echo = { echo: true, ignore: false };
139
- }
140
- const savedState = process.cwd();
141
- console.log('Compression: ' + this.compression);
142
- process.chdir(this.workDir);
143
- console.log('work_dir: ' + this.workDir);
144
- if (this.compression === 'gzip') {
145
- shx.exec(`find . -print0 | cpio -0 -H newc -o | gzip -c > ${this.initrdDest}`);
146
- }
147
- else if (this.compression === 'xz') {
148
- shx.exec(`find . | cpio -o -H newc | xz --check=crc32 --x86 --lzma2=dict=512KiB > ${this.initrdDest}`);
149
- }
150
- process.chdir(savedState);
151
- }
152
- }