penguins-eggs 10.0.32 → 10.0.35

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.
@@ -1498,5 +1498,5 @@
1498
1498
  ]
1499
1499
  }
1500
1500
  },
1501
- "version": "10.0.32"
1501
+ "version": "10.0.35"
1502
1502
  }
package/README.md CHANGED
@@ -491,7 +491,7 @@ EXAMPLES
491
491
  $ eggs adapt
492
492
  ```
493
493
 
494
- _See code: [src/commands/adapt.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.32/src/commands/adapt.ts)_
494
+ _See code: [src/commands/adapt.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.35/src/commands/adapt.ts)_
495
495
 
496
496
  ## `eggs analyze`
497
497
 
@@ -512,7 +512,7 @@ EXAMPLES
512
512
  sudo eggs analyze
513
513
  ```
514
514
 
515
- _See code: [src/commands/analyze.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.32/src/commands/analyze.ts)_
515
+ _See code: [src/commands/analyze.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.35/src/commands/analyze.ts)_
516
516
 
517
517
  ## `eggs autocomplete [SHELL]`
518
518
 
@@ -576,7 +576,7 @@ EXAMPLES
576
576
  sudo eggs calamares --remove
577
577
  ```
578
578
 
579
- _See code: [src/commands/calamares.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.32/src/commands/calamares.ts)_
579
+ _See code: [src/commands/calamares.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.35/src/commands/calamares.ts)_
580
580
 
581
581
  ## `eggs config`
582
582
 
@@ -603,7 +603,7 @@ EXAMPLES
603
603
  sudo eggs config --clean --nointeractive
604
604
  ```
605
605
 
606
- _See code: [src/commands/config.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.32/src/commands/config.ts)_
606
+ _See code: [src/commands/config.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.35/src/commands/config.ts)_
607
607
 
608
608
  ## `eggs cuckoo`
609
609
 
@@ -623,7 +623,7 @@ EXAMPLES
623
623
  sudo eggs cuckoo
624
624
  ```
625
625
 
626
- _See code: [src/commands/cuckoo.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.32/src/commands/cuckoo.ts)_
626
+ _See code: [src/commands/cuckoo.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.35/src/commands/cuckoo.ts)_
627
627
 
628
628
  ## `eggs dad`
629
629
 
@@ -651,7 +651,7 @@ EXAMPLES
651
651
  sudo dad --default
652
652
  ```
653
653
 
654
- _See code: [src/commands/dad.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.32/src/commands/dad.ts)_
654
+ _See code: [src/commands/dad.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.35/src/commands/dad.ts)_
655
655
 
656
656
  ## `eggs export deb`
657
657
 
@@ -678,7 +678,7 @@ EXAMPLES
678
678
  $ eggs export deb --all
679
679
  ```
680
680
 
681
- _See code: [src/commands/export/deb.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.32/src/commands/export/deb.ts)_
681
+ _See code: [src/commands/export/deb.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.35/src/commands/export/deb.ts)_
682
682
 
683
683
  ## `eggs export iso`
684
684
 
@@ -703,7 +703,7 @@ EXAMPLES
703
703
  $ eggs export iso --clean
704
704
  ```
705
705
 
706
- _See code: [src/commands/export/iso.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.32/src/commands/export/iso.ts)_
706
+ _See code: [src/commands/export/iso.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.35/src/commands/export/iso.ts)_
707
707
 
708
708
  ## `eggs help [COMMAND]`
709
709
 
@@ -764,7 +764,7 @@ EXAMPLES
764
764
  sudo eggs install --chroot
765
765
  ```
766
766
 
767
- _See code: [src/commands/install.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.32/src/commands/install.ts)_
767
+ _See code: [src/commands/install.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.35/src/commands/install.ts)_
768
768
 
769
769
  ## `eggs kill`
770
770
 
@@ -787,7 +787,7 @@ EXAMPLES
787
787
  sudo eggs kill
788
788
  ```
789
789
 
790
- _See code: [src/commands/kill.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.32/src/commands/kill.ts)_
790
+ _See code: [src/commands/kill.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.35/src/commands/kill.ts)_
791
791
 
792
792
  ## `eggs krill`
793
793
 
@@ -847,7 +847,7 @@ EXAMPLES
847
847
  $ eggs auto
848
848
  ```
849
849
 
850
- _See code: [src/commands/love.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.32/src/commands/love.ts)_
850
+ _See code: [src/commands/love.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.35/src/commands/love.ts)_
851
851
 
852
852
  ## `eggs mom`
853
853
 
@@ -867,7 +867,7 @@ EXAMPLES
867
867
  $ eggs mom
868
868
  ```
869
869
 
870
- _See code: [src/commands/mom.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.32/src/commands/mom.ts)_
870
+ _See code: [src/commands/mom.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.35/src/commands/mom.ts)_
871
871
 
872
872
  ## `eggs produce`
873
873
 
@@ -924,7 +924,7 @@ EXAMPLES
924
924
  sudo eggs produce --excludes home # exclude ~/*
925
925
  ```
926
926
 
927
- _See code: [src/commands/produce.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.32/src/commands/produce.ts)_
927
+ _See code: [src/commands/produce.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.35/src/commands/produce.ts)_
928
928
 
929
929
  ## `eggs status`
930
930
 
@@ -945,7 +945,7 @@ EXAMPLES
945
945
  $ eggs status
946
946
  ```
947
947
 
948
- _See code: [src/commands/status.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.32/src/commands/status.ts)_
948
+ _See code: [src/commands/status.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.35/src/commands/status.ts)_
949
949
 
950
950
  ## `eggs syncfrom`
951
951
 
@@ -971,7 +971,7 @@ EXAMPLES
971
971
  sudo eggs syncfrom --file /path/to/luks-volume
972
972
  ```
973
973
 
974
- _See code: [src/commands/syncfrom.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.32/src/commands/syncfrom.ts)_
974
+ _See code: [src/commands/syncfrom.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.35/src/commands/syncfrom.ts)_
975
975
 
976
976
  ## `eggs syncto`
977
977
 
@@ -998,7 +998,7 @@ EXAMPLES
998
998
  sudo eggs syncto --excludes
999
999
  ```
1000
1000
 
1001
- _See code: [src/commands/syncto.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.32/src/commands/syncto.ts)_
1001
+ _See code: [src/commands/syncto.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.35/src/commands/syncto.ts)_
1002
1002
 
1003
1003
  ## `eggs tools clean`
1004
1004
 
@@ -1020,7 +1020,7 @@ EXAMPLES
1020
1020
  sudo eggs tools clean
1021
1021
  ```
1022
1022
 
1023
- _See code: [src/commands/tools/clean.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.32/src/commands/tools/clean.ts)_
1023
+ _See code: [src/commands/tools/clean.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.35/src/commands/tools/clean.ts)_
1024
1024
 
1025
1025
  ## `eggs tools ppa`
1026
1026
 
@@ -1046,7 +1046,7 @@ EXAMPLES
1046
1046
  sudo eggs tools ppa --remove
1047
1047
  ```
1048
1048
 
1049
- _See code: [src/commands/tools/ppa.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.32/src/commands/tools/ppa.ts)_
1049
+ _See code: [src/commands/tools/ppa.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.35/src/commands/tools/ppa.ts)_
1050
1050
 
1051
1051
  ## `eggs tools skel`
1052
1052
 
@@ -1070,7 +1070,7 @@ EXAMPLES
1070
1070
  sudo eggs tools skel --user user-to-be-copied
1071
1071
  ```
1072
1072
 
1073
- _See code: [src/commands/tools/skel.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.32/src/commands/tools/skel.ts)_
1073
+ _See code: [src/commands/tools/skel.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.35/src/commands/tools/skel.ts)_
1074
1074
 
1075
1075
  ## `eggs tools stat`
1076
1076
 
@@ -1096,7 +1096,7 @@ EXAMPLES
1096
1096
  $ eggs tools stat --year
1097
1097
  ```
1098
1098
 
1099
- _See code: [src/commands/tools/stat.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.32/src/commands/tools/stat.ts)_
1099
+ _See code: [src/commands/tools/stat.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.35/src/commands/tools/stat.ts)_
1100
1100
 
1101
1101
  ## `eggs tools yolk`
1102
1102
 
@@ -1117,7 +1117,7 @@ EXAMPLES
1117
1117
  sudo eggs tools yolk
1118
1118
  ```
1119
1119
 
1120
- _See code: [src/commands/tools/yolk.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.32/src/commands/tools/yolk.ts)_
1120
+ _See code: [src/commands/tools/yolk.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.35/src/commands/tools/yolk.ts)_
1121
1121
 
1122
1122
  ## `eggs update`
1123
1123
 
@@ -1138,7 +1138,7 @@ EXAMPLES
1138
1138
  $ eggs update
1139
1139
  ```
1140
1140
 
1141
- _See code: [src/commands/update.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.32/src/commands/update.ts)_
1141
+ _See code: [src/commands/update.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.35/src/commands/update.ts)_
1142
1142
 
1143
1143
  ## `eggs version`
1144
1144
 
@@ -1184,7 +1184,7 @@ EXAMPLES
1184
1184
  $ eggs wardrobe get your-wardrobe
1185
1185
  ```
1186
1186
 
1187
- _See code: [src/commands/wardrobe/get.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.32/src/commands/wardrobe/get.ts)_
1187
+ _See code: [src/commands/wardrobe/get.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.35/src/commands/wardrobe/get.ts)_
1188
1188
 
1189
1189
  ## `eggs wardrobe list [REPO]`
1190
1190
 
@@ -1213,7 +1213,7 @@ EXAMPLES
1213
1213
  $ eggs wardrobe list --distro arch
1214
1214
  ```
1215
1215
 
1216
- _See code: [src/commands/wardrobe/list.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.32/src/commands/wardrobe/list.ts)_
1216
+ _See code: [src/commands/wardrobe/list.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.35/src/commands/wardrobe/list.ts)_
1217
1217
 
1218
1218
  ## `eggs wardrobe show [REPO]`
1219
1219
 
@@ -1243,7 +1243,7 @@ EXAMPLES
1243
1243
  $ eggs wardrobe show accessories/
1244
1244
  ```
1245
1245
 
1246
- _See code: [src/commands/wardrobe/show.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.32/src/commands/wardrobe/show.ts)_
1246
+ _See code: [src/commands/wardrobe/show.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.35/src/commands/wardrobe/show.ts)_
1247
1247
 
1248
1248
  ## `eggs wardrobe wear [REPO]`
1249
1249
 
@@ -1274,7 +1274,7 @@ EXAMPLES
1274
1274
  sudo eggs wardrobe wear wagtail/waydroid
1275
1275
  ```
1276
1276
 
1277
- _See code: [src/commands/wardrobe/wear.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.32/src/commands/wardrobe/wear.ts)_
1277
+ _See code: [src/commands/wardrobe/wear.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.35/src/commands/wardrobe/wear.ts)_
1278
1278
  <!-- commandsstop -->
1279
1279
 
1280
1280
  # penGUI
@@ -35,6 +35,10 @@ export default class CliAutologin {
35
35
  */
36
36
  async add(distro, version, user, userPasswd, rootPasswd, chroot = '/') {
37
37
  if (Utils.isSystemd()) {
38
+ /**
39
+ * systemd
40
+ */
41
+ Utils.warning("creating CLI autologin systemd");
38
42
  const fileOverride = `${chroot}/etc/systemd/system/getty@.service.d/override.conf`;
39
43
  const dirOverride = path.dirname(fileOverride);
40
44
  if (fs.existsSync(dirOverride)) {
@@ -51,6 +55,10 @@ export default class CliAutologin {
51
55
  await this.addMotd(distro, version, user, userPasswd, rootPasswd, chroot);
52
56
  }
53
57
  else if (Utils.isOpenRc()) {
58
+ /**
59
+ * openrc
60
+ */
61
+ Utils.warning("creating CLI autologin openrc");
54
62
  const inittab = chroot + '/etc/inittab';
55
63
  let content = '';
56
64
  const search = `tty1::respawn:/sbin/getty 38400 tty1`;
@@ -63,7 +71,6 @@ export default class CliAutologin {
63
71
  content += lines[i] + '\n';
64
72
  }
65
73
  fs.writeFileSync(inittab, content, 'utf-8');
66
- // create /bin/autologin
67
74
  const autologin = chroot + '/bin/autologin';
68
75
  content = '#!/bin/sh' + '\n';
69
76
  content += `/bin/login -f ${user}` + '\n';
@@ -73,6 +80,10 @@ export default class CliAutologin {
73
80
  await this.addMotd(distro, version, user, userPasswd, rootPasswd, chroot);
74
81
  }
75
82
  else if (Utils.isSysvinit()) {
83
+ /**
84
+ * sysvinit
85
+ */
86
+ Utils.warning("creating CLI autologin sysvinit");
76
87
  const inittab = chroot + '/etc/inittab';
77
88
  const search = '1:2345:respawn:/sbin/getty';
78
89
  const replace = `1:2345:respawn:/sbin/getty --autologin ${user} 38400 tty1`;
@@ -14,7 +14,7 @@ import Utils from '../utils.js';
14
14
  * @remarks all the utilities
15
15
  */
16
16
  export default class Archlinux {
17
- static packs4calamares = ['calamares-eggs']; // , 'calamares', 'calamares-git']
17
+ static packs4calamares = ['calamares-eggs']; // , 'calamares']
18
18
  /**
19
19
  * Archlinux: calamaresInstall
20
20
  */
@@ -25,7 +25,8 @@ export default class Archlinux {
25
25
  // const cal_eggs = 'arco-calamares-3.3.5-02-x86_64.pkg.tar.zst' // 2024-03-10
26
26
  // const cal_eggs = 'calamares-garuda-3.3.5.r19.g10acebff4-1-x86_64.pkg.tar.zst' // 2024-03-10
27
27
  // const cal_eggs = 'arco-calamares-3.3.6-06-x86_64.pkg.tar.zst' // 24/04/27
28
- const cal_eggs = 'calamares-eggs-3.3.8.r39.g80ef430-1-x86_64.pkg.tar.zst'; // 12/07/24
28
+ // const cal_eggs = 'calamares-eggs-3.3.8.r39.g80ef430-1-x86_64.pkg.tar.zst' // 12/07/24
29
+ const cal_eggs = 'calamares-eggs-3.3.9-1-x86_64.pkg.tar.zst'; // 01/09/2024
29
30
  let cmd = `wget -O /tmp/${cal_eggs} https://sourceforge.net/projects/penguins-eggs/files/PKGBUILD/${cal_eggs}/download`;
30
31
  try {
31
32
  await exec(cmd, echo);
@@ -12,7 +12,7 @@ import Pacman from '../../pacman.js';
12
12
  * @returns yaml-string
13
13
  */
14
14
  export function remove(distro) {
15
- const packages = ['calamares-eggs', 'calamares-garuda', 'calamares'];
15
+ const packages = ['calamares-eggs', 'calamares'];
16
16
  if (distro.familyId === 'archlinux') {
17
17
  packages.push('penguins-eggs');
18
18
  }
@@ -199,7 +199,7 @@ export default class Ovary {
199
199
  });
200
200
  const users = result.data.split('\n');
201
201
  let deluser = 'deluser';
202
- if (this.familyId === 'archlinux') {
202
+ if (this.familyId === 'archlinux' || this.familyId === 'fedora') {
203
203
  deluser = 'userdel';
204
204
  }
205
205
  for (let i = 0; i < users.length - 1; i++) {
@@ -396,13 +396,12 @@ export default class Ovary {
396
396
  text += `test -f "$DESKTOP"/${installerUrl} && gio set "$DESKTOP"/${installerUrl} metadata::trusted true\n`;
397
397
  }
398
398
  else if (Pacman.packageIsInstalled('xfce4-session')) {
399
- // f=FILE; gio set -t string $f metadata::xfce-exe-checksum "$(sha256sum $f | awk '{print $1}')"
400
- text += 'chmod +x "$DESKTOP"/*.desktop';
401
- // await exec(`f="$DESKTOP"/*.desktop; gio set -t string $f metadata::xfce-exe-checksum "$(sha256sum $f | awk '{print $1}')"`)
399
+ text += `# xfce: enable-desktop-links\n`;
400
+ text += `for f in "$DESKTOP"/*.desktop; do chmod +x "$f"; gio set -t string "$f" metadata::xfce-exe-checksum "$(sha256sum "$f" | awk '{print $1}')"; done\n`;
402
401
  }
403
402
  else {
404
- // OTHERS: CINNAMON/KDE/ETC
405
- text += 'chmod +x "$DESKTOP"/*.desktop';
403
+ text += `# others: enable-desktop-links\n`;
404
+ text += 'chmod +x "$DESKTOP"/*.desktop\n';
406
405
  }
407
406
  fs.writeFileSync(script, text, 'utf8');
408
407
  await exec(`chmod a+x ${script}`, this.echo);
@@ -706,11 +705,10 @@ export default class Ovary {
706
705
  */
707
706
  async initrdAlpine() {
708
707
  Utils.warning(`creating ${path.basename(this.settings.initrdImg)} Alpine on ISO/live`);
708
+ const sidecar = path.resolve(__dirname, `../../mkinitfs/initramfs-init.in`);
709
+ Utils.warning(`Adding ${sidecar} to /usr/share/mkinitfs/initramfs-init`);
710
+ await exec(`cp ${sidecar} /usr/share/mkinitfs/initramfs-init`);
709
711
  const initrdImg = 'initramfs-lts';
710
- // dracut
711
- // const pathConf = path.resolve(__dirname, `../../dracut/dracut.conf.d`)
712
- // await exec(`dracut --confdir ${pathConf} ${this.settings.iso_work}live/${initrdImg}`, Utils.setEcho(true))
713
- // mkinitfs
714
712
  const pathConf = path.resolve(__dirname, `../../mkinitfs/live.conf`);
715
713
  await exec(`mkinitfs -c ${pathConf} -o ${this.settings.iso_work}live/${initrdImg}`, Utils.setEcho(true));
716
714
  }
@@ -757,17 +755,26 @@ export default class Ovary {
757
755
  Utils.warning(`creating ${path.basename(this.settings.initrdImg)} Fedora on ISO/live`);
758
756
  // dracut
759
757
  const kernelVersion = shx.exec('uname -r', { silent: true }).stdout.trim();
758
+ const pathConf = path.resolve(__dirname, `../../dracut/live.conf`);
760
759
  const initrdImg = `initramfs-${kernelVersion}`;
761
- const pathConf = path.resolve(__dirname, `../../dracut/dracut.conf.d`);
762
- await exec(`dracut --confdir ${pathConf} ${this.settings.iso_work}live/${initrdImg}`, Utils.setEcho(true));
763
- // await exec(`cp /boot/initramfs-*.img ${this.settings.iso_work}/live/`, this.echo)
760
+ console.log("========================================================");
761
+ console.log(`dracut --conf ${pathConf} ${this.settings.iso_work}live/${initrdImg}`);
762
+ console.log("========================================================");
763
+ await exec(`dracut --conf ${pathConf} ${this.settings.iso_work}live/${initrdImg}`, Utils.setEcho(true));
764
764
  }
765
765
  /**
766
766
  * initrdSuse()
767
767
  */
768
768
  async initrdSuse() {
769
- Utils.warning(`creating ${path.basename(this.settings.initrdImg)} Fedora on ISO/live`);
770
- await exec(`cp /boot/initrd-* ${this.settings.iso_work}/live/`, this.echo);
769
+ Utils.warning(`creating ${path.basename(this.settings.initrdImg)} OpenSuSE on ISO/live`);
770
+ const kernelVersion = shx.exec('uname -r', { silent: true }).stdout.trim();
771
+ const pathConf = path.resolve(__dirname, `../../dracut/live.conf`);
772
+ const initrdImg = `initramfs-${kernelVersion}`;
773
+ console.log("========================================================");
774
+ console.log(`dracut --verbose --conf ${pathConf} ${this.settings.iso_work}live/${initrdImg}`);
775
+ console.log("========================================================");
776
+ await exec(`dracut --conf ${pathConf} ${this.settings.iso_work}live/${initrdImg}`, Utils.setEcho(true));
777
+ process.exit(0);
771
778
  }
772
779
  /**
773
780
  * async isolinux
@@ -871,7 +878,7 @@ export default class Ovary {
871
878
  else if (this.familyId === 'alpine') {
872
879
  kp += `alpinelivelabel=${this.volid} alpinelivesquashfs=/mnt/live/filesystem.squashfs`;
873
880
  }
874
- kp += ` cow_spacesize=4G`;
881
+ kp += ` cow_spacesize=2G`;
875
882
  return kp;
876
883
  }
877
884
  /**
@@ -1516,8 +1523,6 @@ export default class Ovary {
1516
1523
  else {
1517
1524
  this.cliAutologin.add(this.settings.distro.distroId, this.settings.distro.codenameId, this.settings.config.user_opt, this.settings.config.user_opt_passwd, this.settings.config.root_passwd, this.settings.work_dir.merged);
1518
1525
  }
1519
- // Here we are forcing alwats cliAutologin
1520
- // this.cliAutologin.add(this.settings.distro.distroId, this.settings.distro.codenameId, this.settings.config.user_opt, this.settings.config.user_opt_passwd, this.settings.config.root_passwd, this.settings.work_dir.merged)
1521
1526
  }
1522
1527
  await this.editLiveFs(clone, cryptedclone);
1523
1528
  mksquashfsCmd = await this.makeSquashfs(scriptOnly, unsecure);
@@ -103,7 +103,6 @@ export default class Tailor {
103
103
  }
104
104
  if (elements.length > 0) {
105
105
  let step = `installing ${comment}: `;
106
- // if not verbose show strElements
107
106
  if (!this.verbose) {
108
107
  step += strElements.slice(2);
109
108
  }
@@ -324,12 +323,13 @@ export default class Tailor {
324
323
  await exec('apt-get update', Utils.setEcho(false));
325
324
  break;
326
325
  }
327
- case 'arch': {
326
+ case 'archlinux': {
328
327
  await exec('pacman -Sy', Utils.setEcho(false));
329
328
  break;
330
329
  }
331
330
  case 'alpine': {
332
331
  await exec('apk update', Utils.setEcho(false));
332
+ Utils.pressKeyToExit();
333
333
  break;
334
334
  }
335
335
  // No default
@@ -347,7 +347,7 @@ export default class Tailor {
347
347
  await exec('apt-get full-upgrade', Utils.setEcho(false));
348
348
  break;
349
349
  }
350
- case 'arch': {
350
+ case 'archlinux': {
351
351
  await exec('pacman -Su', Utils.setEcho(false));
352
352
  break;
353
353
  }
@@ -388,7 +388,7 @@ export default class Tailor {
388
388
  }
389
389
  break;
390
390
  }
391
- case 'arch': {
391
+ case 'archlinux': {
392
392
  await this.helperInstall(this.materials.sequence.packages, 'packages', `pacman -Sy --noconfirm`);
393
393
  break;
394
394
  }
@@ -34,21 +34,17 @@ export default class Utils {
34
34
  */
35
35
  static snapshotPrefix(distroId: string, codenameId: string): string;
36
36
  /**
37
- * Controlla se il sistema è avviato con systemd
38
- * funziona anche in MX che utilizza systemd
39
- * ma viene avviato con init
40
- */
37
+ * isSystemd
38
+ */
41
39
  static isSystemd(): boolean;
42
40
  /**
43
- *
44
- * @returns
41
+ * isSysvinit
45
42
  */
46
- static isOpenRc(): boolean;
43
+ static isSysvinit(): boolean;
47
44
  /**
48
- *
49
- * @returns
45
+ * isOpenRc
50
46
  */
51
- static isSysvinit(): boolean;
47
+ static isOpenRc(): boolean;
52
48
  /**
53
49
  * ricava path per vmlinuz
54
50
  * Normalmente cerca BOOT_IMAGE
@@ -80,38 +80,35 @@ export default class Utils {
80
80
  return result;
81
81
  }
82
82
  /**
83
- * Controlla se il sistema è avviato con systemd
84
- * funziona anche in MX che utilizza systemd
85
- * ma viene avviato con init
86
- */
83
+ * isSystemd
84
+ */
87
85
  static isSystemd() {
88
- const checkFile = '/tmp/checksystemd';
89
- execSync(`cat /proc/1/comm >${checkFile}`);
90
- const isSystemd = fs.readFileSync(checkFile).includes('systemd');
91
- execSync(`rm ${checkFile}`);
86
+ const isSystemd = fs.readFileSync("/proc/1/comm").includes('systemd');
92
87
  return isSystemd;
93
88
  }
94
89
  /**
95
- *
96
- * @returns
90
+ * isSysvinit
97
91
  */
98
- static isOpenRc() {
99
- const checkFile = '/tmp/checkinit';
100
- execSync(`command -v openrc >${checkFile} 2>&1`);
101
- const isOpenrc = fs.readFileSync(checkFile).includes('openrc');
102
- execSync(`rm ${checkFile}`);
103
- return isOpenrc;
92
+ static isSysvinit() {
93
+ let isSysvinit = false;
94
+ if (!this.isOpenRc()) {
95
+ isSysvinit = fs.readFileSync("/proc/1/comm").includes('init');
96
+ }
97
+ return isSysvinit;
104
98
  }
105
99
  /**
106
- *
107
- * @returns
100
+ * isOpenRc
108
101
  */
109
- static isSysvinit() {
110
- const checkFile = '/tmp/checkinit';
111
- execSync(`cat /proc/1/comm >${checkFile}`);
112
- const isSysvinit = fs.readFileSync(checkFile).includes('init');
113
- execSync(`rm ${checkFile}`);
114
- return isSysvinit;
102
+ static isOpenRc() {
103
+ let isOpenRc = false;
104
+ try {
105
+ execSync('command -v openrc');
106
+ isOpenRc = true;
107
+ }
108
+ catch (error) {
109
+ isOpenRc = false;
110
+ }
111
+ return isOpenRc;
115
112
  }
116
113
  /**
117
114
  * ricava path per vmlinuz
package/dracut/README.md CHANGED
@@ -1,84 +1,52 @@
1
- # dracut
2
- E' solo un tentativo...:
1
+ # dracut on Fedora
3
2
 
4
- * copiare `99custom` in `/usr/lib/dracut/modules.d`
5
- * installare dracut in Alpine
6
- * modificare initrdAlpine in ovary.ts
7
- * create modulo 99custom
8
- * create script 99custom/module-setup.sh
9
- * create script 99custom/mount-live.sh
10
- * create script 99custom/init-live.sh
3
+ ## Install
11
4
 
12
- ## 99custom
13
5
  ```
14
- mkdir -p /usr/lib/dracut/modules.d/99custom
6
+ sudo dnf -y install \
7
+ dracut \
8
+ dracut-live
15
9
  ```
16
10
 
17
- ## 99custom/module-setup.sh
11
+ Packages prerequisites:
18
12
  ```
19
- #!/bin/bash
13
+ sudo dnf -y install \
14
+ biosdevname \
15
+ cifs-utils \
16
+ device-mapper \
17
+ dmraid \
18
+ iproute \
19
+ iscsi-initiator-utils \
20
+ lvm2 \
21
+ mdadm \
22
+ nbd \
23
+ net-tools \
24
+ nfs-utils \
25
+ nvme-cli \
26
+ rng-tools \
27
+ rpcbind \
28
+ wicked
20
29
 
21
- check() {
22
- return 0
23
- }
24
-
25
- depends() {
26
- echo "shutdown"
27
- return 0
28
- }
29
-
30
- install() {
31
- inst_hook cmdline 90 "$moddir/mount-live.sh"
32
- inst_hook pre-mount 50 "$moddir/init-live.sh"
33
- }
34
30
  ```
35
31
 
36
- ## 99custom/mount-live.sh
37
- ```
38
- #!/bin/sh
32
+ Prerequisites we don't have:
39
33
 
40
- mount_live() {
41
- # Trova il dispositivo CD-ROM
42
- for device in $(ls /dev/sr*); do
43
- if mount -r $device /mnt; then
44
- break
45
- fi
46
- done
34
+ * connmanctl
35
+ * connmand
36
+ * connmand-wait-online
37
+ * cryptsetup-luks
47
38
 
48
- # Monta il filesystem squashfs in RO
49
- if [ -e /mnt/live/filesystem.squashfs ]; then
50
- mkdir -p /run/rootro
51
- mount -t squashfs -o ro /mnt/live/filesystem.squashfs /run/rootro
52
- fi
39
+ # live.conf
40
+ We just need hostonly=no and add modules dmsquash-live and pollcdrom.
53
41
 
54
- # Monta il filesystem union (overlay)
55
- if [ -d /run/rootro ]; then
56
- mkdir -p /run/root-rw /run/overlay
57
- mount -t tmpfs -o rw,noatime,mode=755 tmpfs /run/root-rw
58
- mount -t overlay -o lowerdir=/run/rootro,upperdir=/run/root-rw,workdir=/run/overlay overlay /sysroot
59
- fi
60
- }
61
-
62
- mount_live
63
42
  ```
64
-
65
- ## 99custom/init-live.sh
43
+ # live.conf dracut
44
+ hostonly="no"
45
+ add_dracutmodules+=" dmsquash-live "
46
+ add_dracutmodules+=" pollcdrom "
66
47
  ```
67
- #!/bin/sh
68
48
 
69
- # Esempio di inizializzazioni aggiuntive
70
- echo "Inizializzazioni aggiuntive possono essere aggiunte qui"
49
+ testing:
71
50
  ```
72
-
73
- # Comando in ovary
74
- ```
75
- let initrdImg = 'initramfs-lts'
76
- // dracut
77
- const pathConf = path.resolve(__dirname, `../../dracut/dracut.conf.d`)
78
- await exec(`dracut --confdir ${pathConf} ${this.settings.iso_work}live/${initrdImg}`, Utils.setEcho(true))
51
+ sudo dracut --verbose --conf /usr/lib/penguins-eggs/dracut/live.conf /home/eggs/.mnt/iso/live/initramfs-6.10.6-200.fc40.x86_64
79
52
  ```
80
-
81
- # TESTING
82
- sudo ./install-dracut-99-custom
83
- sudo dracut --confdir dracut/dracut.conf.d initramfs-dummy
84
-
@@ -0,0 +1,8 @@
1
+ # live.conf dracut
2
+ hostonly="no"
3
+ add_dracutmodules+=" dmsquash-live "
4
+ add_dracutmodules+=" pollcdrom "
5
+ # not needed for livecd
6
+ #add_dracutmodules+=" dmsquash-live-ntfs "
7
+ #add_dracutmodules+=" dmsquash-live-autooverlay "
8
+
Binary file