penguins-eggs 9.5.22 → 9.5.23
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 +1 -1
- package/dist/classes/ovary.js +119 -82
- package/dist/classes/utils.js +1 -1
- package/dist/lib/kill_me_softly.js +17 -11
- package/package.json +1 -1
- package/scripts/addaur.sh +0 -32
package/.oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"9.5.22","commands":{"adapt":{"id":"adapt","description":"adapt monitor resolution for VM only","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs adapt"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[]},"analyze":{"id":"analyze","description":"analyze for syncto","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs analyze"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"calamares":{"id":"calamares","description":"configure calamares or install or configure it","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs calamares","sudo eggs calamares --install","sudo eggs calamares --install --theme=/path/to/theme","sudo eggs calamares --remove"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"install":{"name":"install","type":"boolean","char":"i","description":"install calamares and its dependencies","allowNo":false},"nointeractive":{"name":"nointeractive","type":"boolean","char":"n","description":"no user interaction","allowNo":false},"noicons":{"name":"noicons","type":"boolean","char":"N","description":"no icons","allowNo":false},"release":{"name":"release","type":"boolean","char":"r","description":"release: remove calamares and all its dependencies after the installation","allowNo":false},"remove":{"name":"remove","type":"boolean","description":"remove calamares and its dependencies","allowNo":false},"theme":{"name":"theme","type":"option","description":"theme/branding for eggs and calamares","multiple":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[]},"config":{"id":"config","description":"Configure and install prerequisites deb packages to run it","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs config","sudo eggs config --clean","sudo eggs config --clean --nointeractive"],"flags":{"clean":{"name":"clean","type":"boolean","char":"c","description":"remove old configuration before to create new one","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"nointeractive":{"name":"nointeractive","type":"boolean","char":"n","description":"no user interaction","allowNo":false},"noicons":{"name":"noicons","type":"boolean","char":"N","description":"no icons","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"cuckoo":{"id":"cuckoo","description":"PXE start with proxy-dhcp","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs cuckoo"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"dad":{"id":"dad","description":"ask help from daddy - TUI configuration helper","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo dad","sudo dad --clean","sudo dad --default"],"flags":{"clean":{"name":"clean","type":"boolean","char":"c","description":"remove old configuration before to create","allowNo":false},"default":{"name":"default","type":"boolean","char":"d","description":"remove old configuration and force default","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[]},"install":{"id":"install","description":"krill: the CLI system installer - the egg became a penguin!","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs install","sudo eggs install --unattended --halt","sudo eggs install --custom it"],"flags":{"crypted":{"name":"crypted","type":"boolean","char":"k","description":"Crypted CLI installation","allowNo":false},"custom":{"name":"custom","type":"option","char":"c","description":"custom unattended configuration","multiple":false},"domain":{"name":"domain","type":"option","char":"d","description":"Domain name, defult: .local","multiple":false},"halt":{"name":"halt","type":"boolean","char":"H","description":"Halt the system after installation","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"ip":{"name":"ip","type":"boolean","char":"i","description":"hostname as ip, eg: ip-192-168-1-33","allowNo":false},"nointeractive":{"name":"nointeractive","type":"boolean","char":"n","description":"no user interaction","allowNo":false},"none":{"name":"none","type":"boolean","char":"N","description":"Swap none: 256M","allowNo":false},"pve":{"name":"pve","type":"boolean","char":"p","description":"Proxmox VE install","allowNo":false},"random":{"name":"random","type":"boolean","char":"r","description":"Add random to hostname, eg: colibri-ay412dt","allowNo":false},"small":{"name":"small","type":"boolean","char":"s","description":"Swap small: RAM","allowNo":false},"suspend":{"name":"suspend","type":"boolean","char":"S","description":"Swap suspend: RAM x 2","allowNo":false},"unattended":{"name":"unattended","type":"boolean","char":"u","description":"Unattended installation","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose","allowNo":false}},"args":[]},"kill":{"id":"kill","description":"kill the eggs/free the nest","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs kill"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"nointeractive":{"name":"nointeractive","type":"boolean","char":"n","description":"no user interaction","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"mom":{"id":"mom","description":"ask help from mommy - TUI helper","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs mom"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"produce":{"id":"produce","description":"produce a live image from your system whithout your data","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs produce","sudo eggs produce --standard","sudo eggs produce --max","sudo eggs produce --max --basename=colibri","sudo eggs produce --cryptedclone","sudo eggs produce --clone","sudo eggs produce --basename=colibri","sudo eggs produce --basename=colibri --theme theme --addons adapt"],"flags":{"addons":{"name":"addons","type":"option","description":"addons to be used: adapt, ichoice, pve, rsupport","multiple":true},"basename":{"name":"basename","type":"option","description":"basename","multiple":false},"clone":{"name":"clone","type":"boolean","char":"c","description":"clone","allowNo":false},"cryptedclone":{"name":"cryptedclone","type":"boolean","char":"C","description":"crypted clone","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"max":{"name":"max","type":"boolean","char":"m","description":"max compression","allowNo":false},"nointeractive":{"name":"nointeractive","type":"boolean","char":"n","description":"no user interaction","allowNo":false},"noicons":{"name":"noicons","type":"boolean","char":"N","description":"no icons on desktop","allowNo":false},"prefix":{"name":"prefix","type":"option","char":"p","description":"prefix","multiple":false},"release":{"name":"release","type":"boolean","description":"release: max compression, remove penguins-eggs and calamares after installation","allowNo":false},"script":{"name":"script","type":"boolean","char":"s","description":"script mode. Generate scripts to manage iso build","allowNo":false},"standard":{"name":"standard","type":"boolean","char":"f","description":"standard compression","allowNo":false},"theme":{"name":"theme","type":"option","description":"theme for livecd, calamares branding and partitions","multiple":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false},"yolk":{"name":"yolk","type":"boolean","char":"y","description":"-y force yolk renew","allowNo":false}},"args":[]},"status":{"id":"status","description":"informations about eggs status","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs status"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[]},"syncfrom":{"id":"syncfrom","description":"restore users and user data from a LUKS volumes","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs syncfrom","sudo eggs syncfrom --file /path/to/fileLUKS"],"flags":{"delete":{"name":"delete","type":"option","description":"rsync --delete delete extraneous files from dest dirs","multiple":false},"file":{"name":"file","type":"option","char":"f","description":"file LUKS volume encrypted","multiple":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"rootdir":{"name":"rootdir","type":"option","char":"r","description":"rootdir of the installed system, when used from live","multiple":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"syncto":{"id":"syncto","description":"saves users and user data in a LUKS volume inside the iso","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs syncto","sudo eggs syncto --file /path/to/fileLUKS"],"flags":{"delete":{"name":"delete","type":"option","description":"rsync --delete delete extraneous files from dest dirs","multiple":false},"file":{"name":"file","type":"option","char":"f","description":"file LUKS volume encrypted","multiple":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"update":{"id":"update","description":"update the Penguins' eggs tool","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs update"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"export:deb":{"id":"export:deb","description":"export deb/docs/iso to the destination host","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs export deb","eggs export deb --clean","eggs export deb --all"],"flags":{"all":{"name":"all","type":"boolean","char":"a","description":"export all archs","allowNo":false},"clean":{"name":"clean","type":"boolean","char":"c","description":"remove old .deb before to copy","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"export:iso":{"id":"export:iso","description":"export iso in the destination host","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs export iso","eggs export iso --clean"],"flags":{"clean":{"name":"clean","type":"boolean","char":"c","description":"delete old ISOs before to copy","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"tools:clean":{"id":"tools:clean","description":"clean system log, apt, etc","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs tools clean"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"nointeractive":{"name":"nointeractive","type":"boolean","char":"n","description":"no user interaction","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"tools:ppa":{"id":"tools:ppa","description":"add/remove repo","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs tools ppa --add","sudo eggs tools ppa --remove"],"flags":{"add":{"name":"add","type":"boolean","char":"a","description":"add penguins-eggs PPA repository","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"nointeractive":{"name":"nointeractive","type":"boolean","char":"n","description":"no user interaction","allowNo":false},"remove":{"name":"remove","type":"boolean","char":"r","description":"remove penguins-eggs PPA repository","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"tools:skel":{"id":"tools:skel","description":"update skel from home configuration","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs tools skel","sudo eggs tools skel --user user-to-be-copied"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"user":{"name":"user","type":"option","char":"u","description":"user to be used","multiple":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[]},"tools:stat":{"id":"tools:stat","description":"get statistics from sourceforge","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs tools stat","eggs tools stat --month","eggs tools stat --year"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"month":{"name":"month","type":"boolean","char":"m","description":"current month","allowNo":false},"year":{"name":"year","type":"boolean","char":"y","description":"current year","allowNo":false}},"args":[]},"tools:yolk":{"id":"tools:yolk","description":"configure eggs to install without internet","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs tools yolk"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[],"dir":"/var/local/yolk"},"wardrobe:get":{"id":"wardrobe:get","description":"get warorobe","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs wardrobe get","eggs wardrobe get your-wardrobe"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[{"name":"repo","description":"repository to get","required":false}]},"wardrobe:list":{"id":"wardrobe:list","description":"list costumes and accessoires in wardrobe","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs wardrobe list","eggs wardrobe list your-wardrobe","eggs wardrobe list --distro arch"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"distro":{"name":"distro","type":"option","char":"d","description":"distro","multiple":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[{"name":"wardrobe","description":"wardrobe","required":false}]},"wardrobe:show":{"id":"wardrobe:show","description":"show costumes/accessories in wardrobe","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs wardrobe show colibri","eggs wardrobe show accessories/firmwares","eggs wardrobe show accessories/"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"json":{"name":"json","type":"boolean","char":"j","description":"output JSON","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false},"wardrobe":{"name":"wardrobe","type":"option","char":"w","description":"wardrobe","multiple":false}},"args":[{"name":"costume","description":"costume","required":false}],"example":["eggs wardrobe show colibri","eggs wardrobe show accessories/firmwares","eggs wardrobe show accessories/"]},"wardrobe:wear":{"id":"wardrobe:wear","description":"wear costume/accessories from wardrobe","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs wardrobe wear duck","sudo eggs wardrobe wear accessories/firmwares","sudo eggs wardrobe wear wagtail/waydroid"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"no_accessories":{"name":"no_accessories","type":"boolean","char":"a","description":"not install accessories","allowNo":false},"no_firmwares":{"name":"no_firmwares","type":"boolean","char":"f","description":"not install firmwares","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false},"wardrobe":{"name":"wardrobe","type":"option","char":"w","description":"wardrobe","multiple":false}},"args":[{"name":"costume","description":"costume","required":false}]}}}
|
|
1
|
+
{"version":"9.5.23","commands":{"adapt":{"id":"adapt","description":"adapt monitor resolution for VM only","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs adapt"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[]},"analyze":{"id":"analyze","description":"analyze for syncto","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs analyze"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"calamares":{"id":"calamares","description":"configure calamares or install or configure it","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs calamares","sudo eggs calamares --install","sudo eggs calamares --install --theme=/path/to/theme","sudo eggs calamares --remove"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"install":{"name":"install","type":"boolean","char":"i","description":"install calamares and its dependencies","allowNo":false},"nointeractive":{"name":"nointeractive","type":"boolean","char":"n","description":"no user interaction","allowNo":false},"noicons":{"name":"noicons","type":"boolean","char":"N","description":"no icons","allowNo":false},"release":{"name":"release","type":"boolean","char":"r","description":"release: remove calamares and all its dependencies after the installation","allowNo":false},"remove":{"name":"remove","type":"boolean","description":"remove calamares and its dependencies","allowNo":false},"theme":{"name":"theme","type":"option","description":"theme/branding for eggs and calamares","multiple":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[]},"config":{"id":"config","description":"Configure and install prerequisites deb packages to run it","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs config","sudo eggs config --clean","sudo eggs config --clean --nointeractive"],"flags":{"clean":{"name":"clean","type":"boolean","char":"c","description":"remove old configuration before to create new one","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"nointeractive":{"name":"nointeractive","type":"boolean","char":"n","description":"no user interaction","allowNo":false},"noicons":{"name":"noicons","type":"boolean","char":"N","description":"no icons","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"cuckoo":{"id":"cuckoo","description":"PXE start with proxy-dhcp","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs cuckoo"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"dad":{"id":"dad","description":"ask help from daddy - TUI configuration helper","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo dad","sudo dad --clean","sudo dad --default"],"flags":{"clean":{"name":"clean","type":"boolean","char":"c","description":"remove old configuration before to create","allowNo":false},"default":{"name":"default","type":"boolean","char":"d","description":"remove old configuration and force default","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[]},"install":{"id":"install","description":"krill: the CLI system installer - the egg became a penguin!","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs install","sudo eggs install --unattended --halt","sudo eggs install --custom it"],"flags":{"crypted":{"name":"crypted","type":"boolean","char":"k","description":"Crypted CLI installation","allowNo":false},"custom":{"name":"custom","type":"option","char":"c","description":"custom unattended configuration","multiple":false},"domain":{"name":"domain","type":"option","char":"d","description":"Domain name, defult: .local","multiple":false},"halt":{"name":"halt","type":"boolean","char":"H","description":"Halt the system after installation","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"ip":{"name":"ip","type":"boolean","char":"i","description":"hostname as ip, eg: ip-192-168-1-33","allowNo":false},"nointeractive":{"name":"nointeractive","type":"boolean","char":"n","description":"no user interaction","allowNo":false},"none":{"name":"none","type":"boolean","char":"N","description":"Swap none: 256M","allowNo":false},"pve":{"name":"pve","type":"boolean","char":"p","description":"Proxmox VE install","allowNo":false},"random":{"name":"random","type":"boolean","char":"r","description":"Add random to hostname, eg: colibri-ay412dt","allowNo":false},"small":{"name":"small","type":"boolean","char":"s","description":"Swap small: RAM","allowNo":false},"suspend":{"name":"suspend","type":"boolean","char":"S","description":"Swap suspend: RAM x 2","allowNo":false},"unattended":{"name":"unattended","type":"boolean","char":"u","description":"Unattended installation","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose","allowNo":false}},"args":[]},"kill":{"id":"kill","description":"kill the eggs/free the nest","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs kill"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"nointeractive":{"name":"nointeractive","type":"boolean","char":"n","description":"no user interaction","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"mom":{"id":"mom","description":"ask help from mommy - TUI helper","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs mom"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"produce":{"id":"produce","description":"produce a live image from your system whithout your data","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs produce","sudo eggs produce --standard","sudo eggs produce --max","sudo eggs produce --max --basename=colibri","sudo eggs produce --cryptedclone","sudo eggs produce --clone","sudo eggs produce --basename=colibri","sudo eggs produce --basename=colibri --theme theme --addons adapt"],"flags":{"addons":{"name":"addons","type":"option","description":"addons to be used: adapt, ichoice, pve, rsupport","multiple":true},"basename":{"name":"basename","type":"option","description":"basename","multiple":false},"clone":{"name":"clone","type":"boolean","char":"c","description":"clone","allowNo":false},"cryptedclone":{"name":"cryptedclone","type":"boolean","char":"C","description":"crypted clone","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"max":{"name":"max","type":"boolean","char":"m","description":"max compression","allowNo":false},"nointeractive":{"name":"nointeractive","type":"boolean","char":"n","description":"no user interaction","allowNo":false},"noicons":{"name":"noicons","type":"boolean","char":"N","description":"no icons on desktop","allowNo":false},"prefix":{"name":"prefix","type":"option","char":"p","description":"prefix","multiple":false},"release":{"name":"release","type":"boolean","description":"release: max compression, remove penguins-eggs and calamares after installation","allowNo":false},"script":{"name":"script","type":"boolean","char":"s","description":"script mode. Generate scripts to manage iso build","allowNo":false},"standard":{"name":"standard","type":"boolean","char":"f","description":"standard compression","allowNo":false},"theme":{"name":"theme","type":"option","description":"theme for livecd, calamares branding and partitions","multiple":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false},"yolk":{"name":"yolk","type":"boolean","char":"y","description":"-y force yolk renew","allowNo":false}},"args":[]},"status":{"id":"status","description":"informations about eggs status","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs status"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[]},"syncfrom":{"id":"syncfrom","description":"restore users and user data from a LUKS volumes","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs syncfrom","sudo eggs syncfrom --file /path/to/fileLUKS"],"flags":{"delete":{"name":"delete","type":"option","description":"rsync --delete delete extraneous files from dest dirs","multiple":false},"file":{"name":"file","type":"option","char":"f","description":"file LUKS volume encrypted","multiple":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"rootdir":{"name":"rootdir","type":"option","char":"r","description":"rootdir of the installed system, when used from live","multiple":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"syncto":{"id":"syncto","description":"saves users and user data in a LUKS volume inside the iso","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs syncto","sudo eggs syncto --file /path/to/fileLUKS"],"flags":{"delete":{"name":"delete","type":"option","description":"rsync --delete delete extraneous files from dest dirs","multiple":false},"file":{"name":"file","type":"option","char":"f","description":"file LUKS volume encrypted","multiple":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"update":{"id":"update","description":"update the Penguins' eggs tool","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs update"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"export:deb":{"id":"export:deb","description":"export deb/docs/iso to the destination host","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs export deb","eggs export deb --clean","eggs export deb --all"],"flags":{"all":{"name":"all","type":"boolean","char":"a","description":"export all archs","allowNo":false},"clean":{"name":"clean","type":"boolean","char":"c","description":"remove old .deb before to copy","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"export:iso":{"id":"export:iso","description":"export iso in the destination host","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs export iso","eggs export iso --clean"],"flags":{"clean":{"name":"clean","type":"boolean","char":"c","description":"delete old ISOs before to copy","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"tools:clean":{"id":"tools:clean","description":"clean system log, apt, etc","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs tools clean"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"nointeractive":{"name":"nointeractive","type":"boolean","char":"n","description":"no user interaction","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"tools:ppa":{"id":"tools:ppa","description":"add/remove repo","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs tools ppa --add","sudo eggs tools ppa --remove"],"flags":{"add":{"name":"add","type":"boolean","char":"a","description":"add penguins-eggs PPA repository","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"nointeractive":{"name":"nointeractive","type":"boolean","char":"n","description":"no user interaction","allowNo":false},"remove":{"name":"remove","type":"boolean","char":"r","description":"remove penguins-eggs PPA repository","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"tools:skel":{"id":"tools:skel","description":"update skel from home configuration","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs tools skel","sudo eggs tools skel --user user-to-be-copied"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"user":{"name":"user","type":"option","char":"u","description":"user to be used","multiple":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[]},"tools:stat":{"id":"tools:stat","description":"get statistics from sourceforge","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs tools stat","eggs tools stat --month","eggs tools stat --year"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"month":{"name":"month","type":"boolean","char":"m","description":"current month","allowNo":false},"year":{"name":"year","type":"boolean","char":"y","description":"current year","allowNo":false}},"args":[]},"tools:yolk":{"id":"tools:yolk","description":"configure eggs to install without internet","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs tools yolk"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[],"dir":"/var/local/yolk"},"wardrobe:get":{"id":"wardrobe:get","description":"get warorobe","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs wardrobe get","eggs wardrobe get your-wardrobe"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[{"name":"repo","description":"repository to get","required":false}]},"wardrobe:list":{"id":"wardrobe:list","description":"list costumes and accessoires in wardrobe","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs wardrobe list","eggs wardrobe list your-wardrobe","eggs wardrobe list --distro arch"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"distro":{"name":"distro","type":"option","char":"d","description":"distro","multiple":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[{"name":"wardrobe","description":"wardrobe","required":false}]},"wardrobe:show":{"id":"wardrobe:show","description":"show costumes/accessories in wardrobe","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs wardrobe show colibri","eggs wardrobe show accessories/firmwares","eggs wardrobe show accessories/"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"json":{"name":"json","type":"boolean","char":"j","description":"output JSON","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false},"wardrobe":{"name":"wardrobe","type":"option","char":"w","description":"wardrobe","multiple":false}},"args":[{"name":"costume","description":"costume","required":false}],"example":["eggs wardrobe show colibri","eggs wardrobe show accessories/firmwares","eggs wardrobe show accessories/"]},"wardrobe:wear":{"id":"wardrobe:wear","description":"wear costume/accessories from wardrobe","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs wardrobe wear duck","sudo eggs wardrobe wear accessories/firmwares","sudo eggs wardrobe wear wagtail/waydroid"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"no_accessories":{"name":"no_accessories","type":"boolean","char":"a","description":"not install accessories","allowNo":false},"no_firmwares":{"name":"no_firmwares","type":"boolean","char":"f","description":"not install firmwares","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false},"wardrobe":{"name":"wardrobe","type":"option","char":"w","description":"wardrobe","multiple":false}},"args":[{"name":"costume","description":"costume","required":false}]}}}
|
package/README.md
CHANGED
|
@@ -105,7 +105,7 @@ There are more than a way to install eggs as .deb package, the most practical is
|
|
|
105
105
|
The simplest way to install eggs is download the [package eggs](https://sourceforge.net/projects/penguins-eggs/files/DEBS/) from [sourceforge page of the project](https://sourceforge.net/projects/penguins-eggs/) and install it
|
|
106
106
|
|
|
107
107
|
```
|
|
108
|
-
sudo dpkg -i eggs_9.5.
|
|
108
|
+
sudo dpkg -i eggs_9.5.23_amd64.deb
|
|
109
109
|
```
|
|
110
110
|
|
|
111
111
|
or, on a i386 system:
|
package/dist/classes/ovary.js
CHANGED
|
@@ -166,6 +166,7 @@ class Ovary {
|
|
|
166
166
|
* put reCreate = true in release
|
|
167
167
|
*/
|
|
168
168
|
const reCreate = true;
|
|
169
|
+
let mksquashfsCmd = '';
|
|
169
170
|
if (reCreate) { // start pre-clone
|
|
170
171
|
/**
|
|
171
172
|
* installer
|
|
@@ -213,7 +214,7 @@ class Ovary {
|
|
|
213
214
|
this.cliAutologin.addAutologin(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);
|
|
214
215
|
}
|
|
215
216
|
await this.editLiveFs(clone, cryptedclone);
|
|
216
|
-
await this.makeSquashfs(scriptOnly);
|
|
217
|
+
mksquashfsCmd = await this.makeSquashfs(scriptOnly);
|
|
217
218
|
await this.uBindLiveFs(); // Lo smonto prima della fase di backup
|
|
218
219
|
}
|
|
219
220
|
if (cryptedclone) {
|
|
@@ -223,38 +224,37 @@ class Ovary {
|
|
|
223
224
|
utils_2.default.warning(`moving ${luksFile} in ${this.ovarium}iso/live`);
|
|
224
225
|
await (0, utils_1.exec)(`mv ${luksFile} ${this.ovarium}iso/live`, this.echo);
|
|
225
226
|
}
|
|
226
|
-
const
|
|
227
|
+
const mkIsofsCmd = this.xorrisoCommand(clone, cryptedclone).replace(/\s\s+/g, ' ');
|
|
228
|
+
const info = utils_2.default.getVolid(this.settings.remix.name);
|
|
229
|
+
this.makeDotDisk(info, mksquashfsCmd, mkIsofsCmd);
|
|
227
230
|
/**
|
|
228
231
|
* patch to emulate miso/archiso on archilinux
|
|
229
232
|
*/
|
|
230
233
|
if (this.familyId === 'archlinux') {
|
|
234
|
+
let pathName = `arch/x86_64/airootfs`;
|
|
235
|
+
let hashCmd = 'sha512sum';
|
|
236
|
+
let hashExt = '.sha512';
|
|
231
237
|
if (this.settings.distro.distroId === 'ManjaroLinux') {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
}
|
|
236
|
-
else if (this.settings.distro.distroId === 'Arch' ||
|
|
237
|
-
this.settings.distro.distroId === 'blendOS' ||
|
|
238
|
-
this.settings.distro.distroId === 'Garuda' ||
|
|
239
|
-
this.settings.distro.distroId === 'phyOS' ||
|
|
240
|
-
this.settings.distro.distroId === 'RebornOS' ||
|
|
241
|
-
this.settings.distro.distroId === 'EndeavourOS') {
|
|
242
|
-
await (0, utils_1.exec)(`mkdir ${this.settings.iso_work}arch/x86_64 -p`, this.echo);
|
|
243
|
-
await (0, utils_1.exec)(`ln ${this.settings.iso_work}live/filesystem.squashfs ${this.settings.iso_work}arch/x86_64/airootfs.sfs`, this.echo);
|
|
244
|
-
await (0, utils_1.exec)(`sha512sum ${this.settings.iso_work}live/filesystem.squashfs > ${this.settings.iso_work}arch/x86_64/airootfs.sha512`, this.echo);
|
|
238
|
+
pathName = `manjaro/x86_64/livefs`;
|
|
239
|
+
hashCmd = `md5sum`;
|
|
240
|
+
hashExt = '.md5';
|
|
245
241
|
}
|
|
242
|
+
await (0, utils_1.exec)(`mkdir ${this.settings.iso_work}${pathName}/x86_64 -p`, this.echo);
|
|
243
|
+
// await exec(`ln -s ${this.settings.iso_work}live/filesystem.squashfs ${this.settings.iso_work}${pathName}.sfs`, this.echo)
|
|
244
|
+
await (0, utils_1.exec)(`mv ${this.settings.iso_work}live/filesystem.squashfs ${this.settings.iso_work}${pathName}.sfs`, this.echo);
|
|
245
|
+
await (0, utils_1.exec)(`${hashCmd} ${this.settings.iso_work}${pathName}.sfs > ${this.settings.iso_work}${pathName}${hashExt}`, this.echo);
|
|
246
246
|
}
|
|
247
|
-
await this.makeIso(
|
|
247
|
+
await this.makeIso(mkIsofsCmd, scriptOnly);
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
250
|
/**
|
|
251
251
|
* Crea la struttura della workdir
|
|
252
252
|
*/
|
|
253
253
|
async liveCreateStructure() {
|
|
254
|
-
// efi-work iso memdiskDir sotto mountpoint
|
|
255
254
|
if (this.verbose) {
|
|
256
255
|
console.log('Ovary: liveCreateStructure');
|
|
257
256
|
}
|
|
257
|
+
// efi-work iso memdiskDir sotto mountpoint
|
|
258
258
|
utils_2.default.warning(`Creating egg in ${this.settings.config.snapshot_dir}`);
|
|
259
259
|
let cmd;
|
|
260
260
|
if (!fs_1.default.existsSync(this.settings.config.snapshot_dir)) {
|
|
@@ -285,11 +285,11 @@ class Ovary {
|
|
|
285
285
|
* Creo le directory di destinazione per boot, efi, isolinux e live
|
|
286
286
|
*/
|
|
287
287
|
if (!fs_1.default.existsSync(this.settings.iso_work)) {
|
|
288
|
-
cmd = `mkdir -p ${this.settings.iso_work}
|
|
288
|
+
cmd = `mkdir -p ${this.settings.iso_work}boot/grub/${utils_2.default.machineUEFI()}`;
|
|
289
289
|
this.tryCatch(cmd);
|
|
290
|
-
cmd = `mkdir -p ${this.settings.iso_work}
|
|
290
|
+
cmd = `mkdir -p ${this.settings.iso_work}efi/boot`;
|
|
291
291
|
this.tryCatch(cmd);
|
|
292
|
-
cmd = `mkdir -p ${this.settings.iso_work}
|
|
292
|
+
cmd = `mkdir -p ${this.settings.iso_work}isolinux`;
|
|
293
293
|
this.tryCatch(cmd);
|
|
294
294
|
cmd = `mkdir -p ${this.settings.iso_work}live`;
|
|
295
295
|
this.tryCatch(cmd);
|
|
@@ -300,6 +300,9 @@ class Ovary {
|
|
|
300
300
|
* @param cmd
|
|
301
301
|
*/
|
|
302
302
|
async tryCatch(cmd = '') {
|
|
303
|
+
if (this.verbose) {
|
|
304
|
+
console.log('Ovary: tryCatch');
|
|
305
|
+
}
|
|
303
306
|
try {
|
|
304
307
|
await (0, utils_1.exec)(cmd, this.echo);
|
|
305
308
|
}
|
|
@@ -320,7 +323,7 @@ class Ovary {
|
|
|
320
323
|
*/
|
|
321
324
|
async editLiveFs(clone = false, cryptedclone = false) {
|
|
322
325
|
if (this.verbose) {
|
|
323
|
-
console.log('
|
|
326
|
+
console.log('Ovary: editLiveFs');
|
|
324
327
|
}
|
|
325
328
|
/**
|
|
326
329
|
* /etc/penguins-eggs.d/is_clone file created on live
|
|
@@ -528,8 +531,7 @@ class Ovary {
|
|
|
528
531
|
*/
|
|
529
532
|
async syslinux() {
|
|
530
533
|
if (this.verbose) {
|
|
531
|
-
console.log('
|
|
532
|
-
console.log('syslinux path: ' + this.settings.distro.syslinuxPath);
|
|
534
|
+
console.log('Ovary: syslinux');
|
|
533
535
|
}
|
|
534
536
|
await (0, utils_1.exec)(`cp ${this.settings.distro.syslinuxPath}/vesamenu.c32 ${this.settings.iso_work}/isolinux/`, this.echo);
|
|
535
537
|
await (0, utils_1.exec)(`cp ${this.settings.distro.syslinuxPath}/chain.c32 ${this.settings.iso_work}/isolinux/`, this.echo);
|
|
@@ -549,7 +551,7 @@ class Ovary {
|
|
|
549
551
|
*/
|
|
550
552
|
async isolinux(theme = 'eggs') {
|
|
551
553
|
if (this.verbose) {
|
|
552
|
-
console.log('
|
|
554
|
+
console.log('Ovary: isolinux');
|
|
553
555
|
}
|
|
554
556
|
/**
|
|
555
557
|
* isolinux.bin
|
|
@@ -606,6 +608,9 @@ class Ovary {
|
|
|
606
608
|
* @returns kernelParameters
|
|
607
609
|
*/
|
|
608
610
|
kernelParameters() {
|
|
611
|
+
if (this.verbose) {
|
|
612
|
+
console.log('Ovary: kernelParameters');
|
|
613
|
+
}
|
|
609
614
|
const distroId = this.settings.distro.distroId;
|
|
610
615
|
let kp = `boot=live components locales=${process.env.LANG}`;
|
|
611
616
|
if (this.familyId === 'archlinux') {
|
|
@@ -630,11 +635,11 @@ class Ovary {
|
|
|
630
635
|
*/
|
|
631
636
|
async kernelCopy() {
|
|
632
637
|
if (this.verbose) {
|
|
633
|
-
console.log('
|
|
638
|
+
console.log('Ovary: kernelCopy');
|
|
634
639
|
}
|
|
635
640
|
let lackVmlinuzImage = false;
|
|
636
641
|
if (fs_1.default.existsSync(this.settings.kernel_image)) {
|
|
637
|
-
await (0, utils_1.exec)(`cp ${this.settings.kernel_image} ${this.settings.iso_work}
|
|
642
|
+
await (0, utils_1.exec)(`cp ${this.settings.kernel_image} ${this.settings.iso_work}live/`, this.echo);
|
|
638
643
|
}
|
|
639
644
|
else {
|
|
640
645
|
utils_2.default.error(`Cannot find ${this.settings.kernel_image}`);
|
|
@@ -650,9 +655,12 @@ class Ovary {
|
|
|
650
655
|
* necessita di echoYes
|
|
651
656
|
*/
|
|
652
657
|
async initrdCreate() {
|
|
658
|
+
if (this.verbose) {
|
|
659
|
+
console.log('Ovary: initrdCreate');
|
|
660
|
+
}
|
|
653
661
|
let initrdImg = utils_2.default.initrdImg();
|
|
654
662
|
initrdImg = initrdImg.slice(Math.max(0, initrdImg.lastIndexOf('/') + 1));
|
|
655
|
-
utils_2.default.warning(`Creating ${initrdImg} in ${this.settings.iso_work}
|
|
663
|
+
utils_2.default.warning(`Creating ${initrdImg} in ${this.settings.iso_work}live/`);
|
|
656
664
|
const distroId = this.settings.distro.distroId;
|
|
657
665
|
let fileConf = 'archlinux';
|
|
658
666
|
if (distroId === 'Arch' ||
|
|
@@ -673,13 +681,16 @@ class Ovary {
|
|
|
673
681
|
fileConf = distroId.toLowerCase();
|
|
674
682
|
}
|
|
675
683
|
let pathConf = node_path_1.default.resolve(__dirname, `../../mkinitcpio/${fileConf}/live.conf`);
|
|
676
|
-
await (0, utils_1.exec)(`mkinitcpio -c ${pathConf} -g ${this.settings.iso_work}
|
|
684
|
+
await (0, utils_1.exec)(`mkinitcpio -c ${pathConf} -g ${this.settings.iso_work}live/${initrdImg}`, utils_2.default.setEcho(true));
|
|
677
685
|
}
|
|
678
686
|
/**
|
|
679
687
|
* We must upgrade to initrdCreate for Debian/Ubuntu
|
|
680
688
|
* @returns
|
|
681
689
|
*/
|
|
682
690
|
async initrdCopy(verbose = false) {
|
|
691
|
+
if (this.verbose) {
|
|
692
|
+
console.log('Ovary: initrdCopy');
|
|
693
|
+
}
|
|
683
694
|
let isCrypted = false;
|
|
684
695
|
utils_2.default.warning('initrdCreate');
|
|
685
696
|
if (fs_1.default.existsSync('/etc/crypttab')) {
|
|
@@ -716,7 +727,7 @@ class Ovary {
|
|
|
716
727
|
*/
|
|
717
728
|
async makeSquashfs(scriptOnly = false) {
|
|
718
729
|
if (this.verbose) {
|
|
719
|
-
console.log('
|
|
730
|
+
console.log('Ovary: makeSquashfs');
|
|
720
731
|
}
|
|
721
732
|
/**
|
|
722
733
|
* exclude all the accurence of cryptdisks in rc0.d, etc
|
|
@@ -764,6 +775,7 @@ class Ovary {
|
|
|
764
775
|
process.exit();
|
|
765
776
|
}
|
|
766
777
|
}
|
|
778
|
+
return cmd;
|
|
767
779
|
}
|
|
768
780
|
/**
|
|
769
781
|
* Restituisce true per le direcory da montare con overlay
|
|
@@ -776,7 +788,10 @@ class Ovary {
|
|
|
776
788
|
*
|
|
777
789
|
* @param dir
|
|
778
790
|
*/
|
|
779
|
-
|
|
791
|
+
mergedAndOverlay(dir) {
|
|
792
|
+
if (this.verbose) {
|
|
793
|
+
console.log('Ovary: mergedAndOverlay');
|
|
794
|
+
}
|
|
780
795
|
const mountDirs = ['boot', 'etc', 'usr', 'var'];
|
|
781
796
|
let mountDir = '';
|
|
782
797
|
let overlay = false;
|
|
@@ -798,6 +813,9 @@ class Ovary {
|
|
|
798
813
|
* - copied: creazione directory e copia
|
|
799
814
|
*/
|
|
800
815
|
merged(dir) {
|
|
816
|
+
if (this.verbose) {
|
|
817
|
+
console.log('Ovary: merged');
|
|
818
|
+
}
|
|
801
819
|
let merged = true;
|
|
802
820
|
if (dir === 'home') {
|
|
803
821
|
merged = this.clone;
|
|
@@ -833,7 +851,7 @@ class Ovary {
|
|
|
833
851
|
*/
|
|
834
852
|
async bindLiveFs() {
|
|
835
853
|
if (this.verbose) {
|
|
836
|
-
console.log('
|
|
854
|
+
console.log('Ovary: bindLiveFs');
|
|
837
855
|
}
|
|
838
856
|
/**
|
|
839
857
|
* Attenzione:
|
|
@@ -855,7 +873,7 @@ class Ovary {
|
|
|
855
873
|
if (dir !== 'boot') {
|
|
856
874
|
if (dir !== 'lost+found') {
|
|
857
875
|
cmd = `# /${dir} is a directory`;
|
|
858
|
-
if (this.
|
|
876
|
+
if (this.mergedAndOverlay(dir)) {
|
|
859
877
|
/**
|
|
860
878
|
* mergedAndOverlay creazione directory, overlay e mount rw
|
|
861
879
|
*/
|
|
@@ -921,9 +939,8 @@ class Ovary {
|
|
|
921
939
|
*/
|
|
922
940
|
async copyBoot() {
|
|
923
941
|
if (this.verbose) {
|
|
924
|
-
console.log('
|
|
942
|
+
console.log('Ovary: copyBoot');
|
|
925
943
|
}
|
|
926
|
-
console.log('ovary: copyBoot');
|
|
927
944
|
await rexec(`cp -r /boot ${this.settings.config.snapshot_mnt}filesystem.squashfs`, this.verbose);
|
|
928
945
|
}
|
|
929
946
|
/**
|
|
@@ -932,7 +949,7 @@ class Ovary {
|
|
|
932
949
|
*/
|
|
933
950
|
async uBindLiveFs() {
|
|
934
951
|
if (this.verbose) {
|
|
935
|
-
console.log('
|
|
952
|
+
console.log('Ovary: uBindLiveFs');
|
|
936
953
|
}
|
|
937
954
|
const cmds = [];
|
|
938
955
|
cmds.push('# NOTE: home, cdrom, dev, live, media, mnt, proc, run, sys and tmp', `# need just to be removed in ${this.settings.work_dir.merged}`);
|
|
@@ -946,7 +963,7 @@ class Ovary {
|
|
|
946
963
|
cmds.push('#############################################################');
|
|
947
964
|
if (n8_1.default.isDirectory(dirname)) {
|
|
948
965
|
cmds.push(`\n# directory: ${dirname}`);
|
|
949
|
-
if (this.
|
|
966
|
+
if (this.mergedAndOverlay(dirname)) {
|
|
950
967
|
cmds.push(`\n# ${dirname} has overlay`, `\n# First, umount it from ${this.settings.config.snapshot_dir}`);
|
|
951
968
|
cmds.push(await rexec(`umount ${this.settings.work_dir.merged}/${dirname}`, this.verbose), `\n# Second, umount it from ${this.settings.work_dir.lowerdir}`);
|
|
952
969
|
cmds.push(await rexec(`umount ${this.settings.work_dir.lowerdir}/${dirname}`, this.verbose));
|
|
@@ -983,6 +1000,9 @@ class Ovary {
|
|
|
983
1000
|
* bind dei virtual file system
|
|
984
1001
|
*/
|
|
985
1002
|
async bindVfs() {
|
|
1003
|
+
if (this.verbose) {
|
|
1004
|
+
console.log('Ovary: bindVfs');
|
|
1005
|
+
}
|
|
986
1006
|
const cmds = [];
|
|
987
1007
|
cmds.push(`mount -o bind /dev ${this.settings.work_dir.merged}/dev`, `mount -o bind /dev/pts ${this.settings.work_dir.merged}/dev/pts`, `mount -o bind /proc ${this.settings.work_dir.merged}/proc`, `mount -o bind /sys ${this.settings.work_dir.merged}/sys`, `mount -o bind /run ${this.settings.work_dir.merged}/run`);
|
|
988
1008
|
// Utils.writeXs(`${this.settings.config.snapshot_dir}bindvfs`, cmds)
|
|
@@ -993,6 +1013,9 @@ class Ovary {
|
|
|
993
1013
|
* @param verbose
|
|
994
1014
|
*/
|
|
995
1015
|
async ubindVfs() {
|
|
1016
|
+
if (this.verbose) {
|
|
1017
|
+
console.log('Ovary: ubindVfs');
|
|
1018
|
+
}
|
|
996
1019
|
const cmds = [];
|
|
997
1020
|
cmds.push(`umount ${this.settings.work_dir.merged}/dev/pts`, `umount ${this.settings.work_dir.merged}/dev`, `umount ${this.settings.work_dir.merged}/proc`, `umount ${this.settings.work_dir.merged}/run`, `umount ${this.settings.work_dir.merged}/sys`);
|
|
998
1021
|
// Utils.writeXs(`${this.settings.config.snapshot_dir}ubindvfs`, cmds)
|
|
@@ -1003,6 +1026,9 @@ class Ovary {
|
|
|
1003
1026
|
* @param verbose
|
|
1004
1027
|
*/
|
|
1005
1028
|
async cleanUsersAccounts() {
|
|
1029
|
+
if (this.verbose) {
|
|
1030
|
+
console.log('Ovary: cleanUsersAccounts');
|
|
1031
|
+
}
|
|
1006
1032
|
/**
|
|
1007
1033
|
* delete all user in chroot
|
|
1008
1034
|
*/
|
|
@@ -1026,13 +1052,14 @@ class Ovary {
|
|
|
1026
1052
|
*/
|
|
1027
1053
|
async createUserLive() {
|
|
1028
1054
|
if (this.verbose) {
|
|
1029
|
-
console.log('
|
|
1055
|
+
console.log('Ovary: createUserLive');
|
|
1030
1056
|
}
|
|
1031
1057
|
const cmds = [];
|
|
1032
1058
|
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' rm /home/' + this.settings.config.user_opt + ' -rf', this.verbose));
|
|
1033
1059
|
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' mkdir /home/' + this.settings.config.user_opt, this.verbose));
|
|
1034
1060
|
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));
|
|
1035
1061
|
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' cp /etc/skel/. /home/' + this.settings.config.user_opt + ' -R', this.verbose));
|
|
1062
|
+
// da problemi con il mount sshfs
|
|
1036
1063
|
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' chown ' + this.settings.config.user_opt + ':users' + ' /home/' + this.settings.config.user_opt + ' -R', this.verbose));
|
|
1037
1064
|
// live password
|
|
1038
1065
|
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));
|
|
@@ -1067,7 +1094,7 @@ class Ovary {
|
|
|
1067
1094
|
*/
|
|
1068
1095
|
async createXdgAutostart(theme = 'eggs', myAddons, noicons = false) {
|
|
1069
1096
|
if (this.verbose) {
|
|
1070
|
-
console.log('
|
|
1097
|
+
console.log('Ovary: createXdgAutostart');
|
|
1071
1098
|
}
|
|
1072
1099
|
const pathHomeLive = `/home/${this.settings.config.user_opt}`;
|
|
1073
1100
|
if (noicons) { // NO icone
|
|
@@ -1204,6 +1231,9 @@ class Ovary {
|
|
|
1204
1231
|
* @param icon
|
|
1205
1232
|
*/
|
|
1206
1233
|
lxdeLink(file, name, icon) {
|
|
1234
|
+
if (this.verbose) {
|
|
1235
|
+
console.log('Ovary: lxdeLink');
|
|
1236
|
+
}
|
|
1207
1237
|
const lnk = `lnk-${file}`;
|
|
1208
1238
|
let text = '';
|
|
1209
1239
|
text += `echo "[Desktop Entry]" >$DESKTOP/${lnk}\n`;
|
|
@@ -1219,6 +1249,9 @@ class Ovary {
|
|
|
1219
1249
|
* @param exclusion {atring} path to add/remove
|
|
1220
1250
|
*/
|
|
1221
1251
|
addRemoveExclusion(add, exclusion) {
|
|
1252
|
+
if (this.verbose) {
|
|
1253
|
+
console.log('Ovary: addRemoveExclusion');
|
|
1254
|
+
}
|
|
1222
1255
|
if (exclusion.startsWith('/')) {
|
|
1223
1256
|
exclusion = exclusion.slice(1); // remove / initial Non compatible with rsync
|
|
1224
1257
|
}
|
|
@@ -1239,11 +1272,8 @@ class Ovary {
|
|
|
1239
1272
|
// #######################################################################################
|
|
1240
1273
|
async makeEfi(theme = 'eggs') {
|
|
1241
1274
|
if (this.verbose) {
|
|
1242
|
-
console.log('
|
|
1275
|
+
console.log('Ovary: makeEfi');
|
|
1243
1276
|
}
|
|
1244
|
-
// const memdiskDir = this.settings.work_dir.path + 'memdiskDir'
|
|
1245
|
-
// const efiWorkDir = this.settings.efi_work
|
|
1246
|
-
// const isoDir = this.settings.iso_work
|
|
1247
1277
|
const memdiskDir = this.settings.config.snapshot_mnt + 'memdiskDir';
|
|
1248
1278
|
const efiWorkDir = this.settings.efi_work;
|
|
1249
1279
|
const isoDir = this.settings.iso_work;
|
|
@@ -1283,15 +1313,15 @@ class Ovary {
|
|
|
1283
1313
|
}
|
|
1284
1314
|
utils_2.default.warning('creating efiWordDir: ' + efiWorkDir);
|
|
1285
1315
|
await (0, utils_1.exec)(`mkdir ${efiWorkDir}`, this.echo);
|
|
1286
|
-
await (0, utils_1.exec)(`mkdir ${efiWorkDir}
|
|
1287
|
-
await (0, utils_1.exec)(`mkdir ${efiWorkDir}
|
|
1288
|
-
await (0, utils_1.exec)(`mkdir ${efiWorkDir}
|
|
1289
|
-
await (0, utils_1.exec)(`mkdir ${efiWorkDir}
|
|
1290
|
-
await (0, utils_1.exec)(`mkdir ${efiWorkDir}
|
|
1316
|
+
await (0, utils_1.exec)(`mkdir ${efiWorkDir}boot`, this.echo);
|
|
1317
|
+
await (0, utils_1.exec)(`mkdir ${efiWorkDir}boot/grub`, this.echo);
|
|
1318
|
+
await (0, utils_1.exec)(`mkdir ${efiWorkDir}boot/grub/${utils_2.default.machineUEFI()}`, this.echo);
|
|
1319
|
+
await (0, utils_1.exec)(`mkdir ${efiWorkDir}efi`, this.echo);
|
|
1320
|
+
await (0, utils_1.exec)(`mkdir ${efiWorkDir}efi/boot`, this.echo);
|
|
1291
1321
|
/**
|
|
1292
1322
|
* copy splash to efiWorkDir
|
|
1293
1323
|
*/
|
|
1294
|
-
const splashDest = `${efiWorkDir}
|
|
1324
|
+
const splashDest = `${efiWorkDir}boot/grub/splash.png`;
|
|
1295
1325
|
let splashSrc = node_path_1.default.resolve(__dirname, `../../addons/${theme}/theme/livecd/splash.png`);
|
|
1296
1326
|
if (this.theme.includes('/')) {
|
|
1297
1327
|
splashSrc = `${theme}/theme/livecd/splash.png`;
|
|
@@ -1304,7 +1334,7 @@ class Ovary {
|
|
|
1304
1334
|
/**
|
|
1305
1335
|
* copy theme
|
|
1306
1336
|
*/
|
|
1307
|
-
const themeDest = `${efiWorkDir}
|
|
1337
|
+
const themeDest = `${efiWorkDir}boot/grub/theme.cfg`;
|
|
1308
1338
|
let themeSrc = node_path_1.default.resolve(__dirname, `../../addons/${theme}/theme/livecd/grub.theme.cfg`);
|
|
1309
1339
|
if (this.theme.includes('/')) {
|
|
1310
1340
|
themeSrc = `${theme}/theme/livecd/grub.theme.cfg`;
|
|
@@ -1320,10 +1350,10 @@ class Ovary {
|
|
|
1320
1350
|
// for i in $(ls /usr/lib/grub/x86_64-efi |grep part_|grep \.mod|sed 's/.mod//'); do echo "insmod $i" >> boot/grub/x86_64-efi/grub.cfg; done
|
|
1321
1351
|
let cmd = `for i in $(ls /usr/lib/grub/${utils_2.default.machineUEFI()}|grep part_|grep \.mod|sed 's/.mod//'); do echo "insmod $i" >> ${efiWorkDir}boot/grub/${utils_2.default.machineUEFI()}/grub.cfg; done`;
|
|
1322
1352
|
await (0, utils_1.exec)(cmd, this.echo);
|
|
1323
|
-
//
|
|
1324
|
-
cmd = `for i in efi_gop efi_uga ieee1275_fb vbe vga video_bochs video_cirrus jpeg png gfxterm ; do echo "insmod $i" >> ${efiWorkDir}
|
|
1353
|
+
//cmd = `for i in efi_gop efi_uga ieee1275_fb vbe vga video_bochs video_cirrus jpeg png gfxterm ; do echo "insmod $i" >> ${efiWorkDir}boot/grub/${Utils.machineUEFI()}/grub.cfg ; done`
|
|
1354
|
+
cmd = `for i in efi_gop efi_uga ieee1275_fb vbe vga video_bochs video_cirrus jpeg png gfxterm ; do echo "insmod $i" >> ${efiWorkDir}boot/grub/${utils_2.default.machineUEFI()}/grub.cfg ; done`;
|
|
1325
1355
|
await (0, utils_1.exec)(cmd, this.echo);
|
|
1326
|
-
await (0, utils_1.exec)(`echo "source /boot/grub/grub.cfg" >> ${efiWorkDir}
|
|
1356
|
+
await (0, utils_1.exec)(`echo "source /boot/grub/grub.cfg" >> ${efiWorkDir}boot/grub/${utils_2.default.machineUEFI()}/grub.cfg`, this.echo);
|
|
1327
1357
|
/**
|
|
1328
1358
|
* andiamo in memdiskDir
|
|
1329
1359
|
*/
|
|
@@ -1346,41 +1376,41 @@ class Ovary {
|
|
|
1346
1376
|
await (0, utils_1.exec)(`${grubName}-mkimage -O "${utils_2.default.machineUEFI()}" -m "${memdiskDir}/memdisk" -o "${memdiskDir}/bootx64.efi" -p '(memdisk)/boot/grub' search iso9660 configfile normal memdisk tar cat part_msdos part_gpt fat ext2 ntfs ntfscomp hfsplus chain boot linux`, this.echo);
|
|
1347
1377
|
// popd torna in efiWorkDir
|
|
1348
1378
|
// copy the grub image to efi/boot (to go later in the device's root)
|
|
1349
|
-
await (0, utils_1.exec)(`cp ${memdiskDir}/bootx64.efi ${efiWorkDir}
|
|
1379
|
+
await (0, utils_1.exec)(`cp ${memdiskDir}/bootx64.efi ${efiWorkDir}efi/boot`, this.echo);
|
|
1350
1380
|
// #######################
|
|
1351
1381
|
// Do the boot image "boot/grub/efiboot.img"
|
|
1352
|
-
await (0, utils_1.exec)(`dd if=/dev/zero of=${efiWorkDir}
|
|
1353
|
-
await (0, utils_1.exec)(`/sbin/mkdosfs -F 12 ${efiWorkDir}
|
|
1354
|
-
await (0, utils_1.exec)(`mkdir ${efiWorkDir}
|
|
1355
|
-
await (0, utils_1.exec)(`mount -o loop ${efiWorkDir}
|
|
1356
|
-
await (0, utils_1.exec)(`mkdir ${efiWorkDir}
|
|
1357
|
-
await (0, utils_1.exec)(`mkdir ${efiWorkDir}
|
|
1382
|
+
await (0, utils_1.exec)(`dd if=/dev/zero of=${efiWorkDir}boot/grub/efiboot.img bs=1K count=1440`, this.echo);
|
|
1383
|
+
await (0, utils_1.exec)(`/sbin/mkdosfs -F 12 ${efiWorkDir}boot/grub/efiboot.img`, this.echo);
|
|
1384
|
+
await (0, utils_1.exec)(`mkdir ${efiWorkDir}img-mnt`, this.echo);
|
|
1385
|
+
await (0, utils_1.exec)(`mount -o loop ${efiWorkDir}boot/grub/efiboot.img ${efiWorkDir}img-mnt`, this.echo);
|
|
1386
|
+
await (0, utils_1.exec)(`mkdir ${efiWorkDir}img-mnt/efi`, this.echo);
|
|
1387
|
+
await (0, utils_1.exec)(`mkdir ${efiWorkDir}img-mnt/efi/boot`, this.echo);
|
|
1358
1388
|
// era cp -r
|
|
1359
|
-
await (0, utils_1.exec)(`cp ${memdiskDir}/bootx64.efi ${efiWorkDir}
|
|
1389
|
+
await (0, utils_1.exec)(`cp ${memdiskDir}/bootx64.efi ${efiWorkDir}img-mnt/efi/boot`, this.echo);
|
|
1360
1390
|
// #######################
|
|
1361
1391
|
// copy modules and font
|
|
1362
|
-
await (0, utils_1.exec)(`cp -r /usr/lib/grub/${utils_2.default.machineUEFI()}/* ${efiWorkDir}
|
|
1392
|
+
await (0, utils_1.exec)(`cp -r /usr/lib/grub/${utils_2.default.machineUEFI()}/* ${efiWorkDir}boot/grub/${utils_2.default.machineUEFI()}/`, this.echo);
|
|
1363
1393
|
// if this doesn't work try another font from the same place (grub's default, unicode.pf2, is much larger)
|
|
1364
1394
|
// Either of these will work, and they look the same to me. Unicode seems to work with qemu. -fsr
|
|
1365
1395
|
if (fs_1.default.existsSync('/usr/share/grub/font.pf2')) {
|
|
1366
|
-
await (0, utils_1.exec)(`cp /usr/share/grub/font.pf2 ${efiWorkDir}
|
|
1396
|
+
await (0, utils_1.exec)(`cp /usr/share/grub/font.pf2 ${efiWorkDir}boot/grub/font.pf2`, this.echo);
|
|
1367
1397
|
}
|
|
1368
1398
|
else if (fs_1.default.existsSync('/usr/share/grub/unicode.pf2')) {
|
|
1369
|
-
await (0, utils_1.exec)(`cp /usr/share/grub/unicode.pf2 ${efiWorkDir}
|
|
1399
|
+
await (0, utils_1.exec)(`cp /usr/share/grub/unicode.pf2 ${efiWorkDir}boot/grub/font.pf2`, this.echo);
|
|
1370
1400
|
}
|
|
1371
1401
|
else if (fs_1.default.existsSync('/usr/share/grub/ascii.pf2')) {
|
|
1372
|
-
await (0, utils_1.exec)(`cp /usr/share/grub/ascii.pf2 ${efiWorkDir}
|
|
1402
|
+
await (0, utils_1.exec)(`cp /usr/share/grub/ascii.pf2 ${efiWorkDir}boot/grub/font.pf2`, this.echo);
|
|
1373
1403
|
}
|
|
1374
1404
|
// doesn't need to be root-owned
|
|
1375
1405
|
// chown -R 1000:1000 $(pwd) 2>/dev/null
|
|
1376
1406
|
// Cleanup efi temps
|
|
1377
|
-
await (0, utils_1.exec)(`umount ${efiWorkDir}
|
|
1378
|
-
await (0, utils_1.exec)(`rmdir ${efiWorkDir}
|
|
1407
|
+
await (0, utils_1.exec)(`umount ${efiWorkDir}img-mnt`, this.echo);
|
|
1408
|
+
await (0, utils_1.exec)(`rmdir ${efiWorkDir}img-mnt`, this.echo);
|
|
1379
1409
|
await (0, utils_1.exec)(`rm ${memdiskDir}/img-mnt -rf`, this.echo);
|
|
1380
1410
|
// popd
|
|
1381
1411
|
// Copy efi files to iso
|
|
1382
|
-
await (0, utils_1.exec)(`rsync -avx ${efiWorkDir}
|
|
1383
|
-
await (0, utils_1.exec)(`rsync -avx ${efiWorkDir}
|
|
1412
|
+
await (0, utils_1.exec)(`rsync -avx ${efiWorkDir}boot ${isoDir}/`, this.echo);
|
|
1413
|
+
await (0, utils_1.exec)(`rsync -avx ${efiWorkDir}efi ${isoDir}/`, this.echo);
|
|
1384
1414
|
// Do the main grub.cfg (which gets loaded last):
|
|
1385
1415
|
// grub.theme.cfg
|
|
1386
1416
|
let grubThemeSrc = node_path_1.default.resolve(__dirname, `../../addons/${theme}/theme/livecd/grub.theme.cfg`);
|
|
@@ -1420,26 +1450,24 @@ class Ovary {
|
|
|
1420
1450
|
// #######################################################################################
|
|
1421
1451
|
/**
|
|
1422
1452
|
* makeDotDisk
|
|
1423
|
-
* create .disk/info, .disk/mksquashfs, .disk/mkiso
|
|
1424
|
-
* return mkiso
|
|
1425
1453
|
*/
|
|
1426
|
-
makeDotDisk(
|
|
1427
|
-
|
|
1454
|
+
makeDotDisk(info = '', mksquashfs = '', mkisofs = '') {
|
|
1455
|
+
if (this.verbose) {
|
|
1456
|
+
console.log('Ovary: makeDotDisk');
|
|
1457
|
+
}
|
|
1458
|
+
const dotDisk = this.settings.iso_work + '.disk';
|
|
1428
1459
|
if (fs_1.default.existsSync(dotDisk)) {
|
|
1429
1460
|
shelljs_1.default.rm('-rf', dotDisk);
|
|
1430
1461
|
}
|
|
1431
1462
|
shelljs_1.default.mkdir('-p', dotDisk);
|
|
1463
|
+
let text = `# Created at: ${utils_2.default.formatDate(new Date())}\n`;
|
|
1464
|
+
text += `# penguins_eggs v. ${utils_2.default.getPackageVersion()}\n`;
|
|
1432
1465
|
// .disk/info
|
|
1433
|
-
|
|
1434
|
-
let content = utils_2.default.getVolid(this.settings.remix.name);
|
|
1435
|
-
fs_1.default.writeFileSync(file, content, 'utf-8');
|
|
1466
|
+
fs_1.default.writeFileSync(dotDisk + '/info', info, 'utf-8');
|
|
1436
1467
|
// .disk/mksquashfs
|
|
1437
|
-
|
|
1468
|
+
fs_1.default.writeFileSync(dotDisk + '/mksquashfs', text + mksquashfs, 'utf-8');
|
|
1438
1469
|
// .disk/mkisofs
|
|
1439
|
-
|
|
1440
|
-
file = dotDisk + '/mkisofs';
|
|
1441
|
-
fs_1.default.writeFileSync(file, content, 'utf-8');
|
|
1442
|
-
return content;
|
|
1470
|
+
fs_1.default.writeFileSync(dotDisk + '/mkisofs', text + mkisofs, 'utf-8');
|
|
1443
1471
|
}
|
|
1444
1472
|
/**
|
|
1445
1473
|
*
|
|
@@ -1447,6 +1475,9 @@ class Ovary {
|
|
|
1447
1475
|
* @returns cmd 4 mkiso
|
|
1448
1476
|
*/
|
|
1449
1477
|
xorrisoCommand(clone = false, cryptedclone = false) {
|
|
1478
|
+
if (this.verbose) {
|
|
1479
|
+
console.log('Ovary: xorrisoCommand');
|
|
1480
|
+
}
|
|
1450
1481
|
const volid = utils_2.default.getVolid(this.settings.remix.name);
|
|
1451
1482
|
let prefix = this.settings.config.snapshot_prefix;
|
|
1452
1483
|
if (prefix.endsWith('rolling-')) {
|
|
@@ -1600,7 +1631,7 @@ class Ovary {
|
|
|
1600
1631
|
async makeIso(cmd, scriptOnly = false) {
|
|
1601
1632
|
// echo = { echo: true, ignore: false }
|
|
1602
1633
|
if (this.verbose) {
|
|
1603
|
-
console.log('
|
|
1634
|
+
console.log('Ovary: makeIso');
|
|
1604
1635
|
}
|
|
1605
1636
|
//Utils.writeX(`${this.settings.config.snapshot_dir}mkisofs`, cmd)
|
|
1606
1637
|
utils_2.default.writeX(`${this.settings.work_dir.ovarium}mkisofs`, cmd);
|
|
@@ -1644,6 +1675,9 @@ class Ovary {
|
|
|
1644
1675
|
* fill
|
|
1645
1676
|
*/
|
|
1646
1677
|
async usersFill() {
|
|
1678
|
+
if (this.verbose) {
|
|
1679
|
+
console.log('Ovary: usersFill');
|
|
1680
|
+
}
|
|
1647
1681
|
const usersArray = [];
|
|
1648
1682
|
await (0, promises_1.access)('/etc/passwd', fs_2.constants.R_OK | fs_2.constants.W_OK);
|
|
1649
1683
|
const passwd = fs_1.default.readFileSync('/etc/passwd', 'utf-8').split('\n');
|
|
@@ -1665,7 +1699,7 @@ exports.default = Ovary;
|
|
|
1665
1699
|
*/
|
|
1666
1700
|
async function makeIfNotExist(path, verbose = false) {
|
|
1667
1701
|
if (verbose) {
|
|
1668
|
-
console.log(`
|
|
1702
|
+
console.log(`Ovary: makeIfNotExist(${path})`);
|
|
1669
1703
|
}
|
|
1670
1704
|
const echo = utils_2.default.setEcho(verbose);
|
|
1671
1705
|
let cmd = `# ${path} alreasy exist`;
|
|
@@ -1681,6 +1715,9 @@ async function makeIfNotExist(path, verbose = false) {
|
|
|
1681
1715
|
* @param echo
|
|
1682
1716
|
*/
|
|
1683
1717
|
async function rexec(cmd, verbose = false) {
|
|
1718
|
+
if (verbose) {
|
|
1719
|
+
console.log(`Ovary: rexec(${cmd})`);
|
|
1720
|
+
}
|
|
1684
1721
|
const echo = utils_2.default.setEcho(verbose);
|
|
1685
1722
|
const check = await (0, utils_1.exec)(cmd, echo);
|
|
1686
1723
|
if (!cmd.startsWith('umount')) { // skip umount errors
|
package/dist/classes/utils.js
CHANGED
|
@@ -9,23 +9,29 @@ const utils_2 = require("./utils");
|
|
|
9
9
|
*/
|
|
10
10
|
async function killMeSoftly(eggsRoot = `/home/eggs`, eggsMnt = '/home/eggs/mnt') {
|
|
11
11
|
const echo = utils_1.default.setEcho(false);
|
|
12
|
+
const liveFs = `${eggsMnt}filesystem.squashfs`;
|
|
13
|
+
/**
|
|
14
|
+
* refuse if /home/eggs/mnt/filesystem.squashfs
|
|
15
|
+
*/
|
|
16
|
+
if (haveBindedDirs(liveFs)) {
|
|
17
|
+
utils_1.default.warning(`You have binded dirs under ${liveFs}, kill is not possible!`);
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* if eggsMnt is mountpoint
|
|
22
|
+
*/
|
|
12
23
|
if (utils_1.default.isMountpoint(eggsMnt)) {
|
|
13
|
-
|
|
14
|
-
utils_1.default.warning(`You have binded dirs under ${eggsMnt}, kill is not possible!`);
|
|
15
|
-
process.exit(1);
|
|
16
|
-
}
|
|
17
|
-
// cancello SOLO:
|
|
24
|
+
// Just delete
|
|
18
25
|
await (0, utils_2.exec)(`rm -rf ${eggsMnt}efi-work`);
|
|
19
|
-
await (0, utils_2.exec)(`rm -rf ${eggsMnt}filesystem.squashfs`);
|
|
20
26
|
await (0, utils_2.exec)(`rm -rf ${eggsMnt}iso`);
|
|
21
27
|
await (0, utils_2.exec)(`rm -rf ${eggsMnt}memdiskDir`);
|
|
22
28
|
await (0, utils_2.exec)(`rm -rf ${eggsRoot}ovarium`);
|
|
23
|
-
|
|
29
|
+
// double check !haveBindedDirs
|
|
30
|
+
if (!haveBindedDirs(liveFs)) {
|
|
31
|
+
await (0, utils_2.exec)(`rm -rf ${liveFs}`);
|
|
32
|
+
}
|
|
24
33
|
process.exit(0);
|
|
25
34
|
}
|
|
26
|
-
if (isBinded(eggsRoot)) {
|
|
27
|
-
console.log(`Please, run:\nsudo umount ${eggsRoot}\nbefore to kill`);
|
|
28
|
-
}
|
|
29
35
|
await (0, utils_2.exec)(`rm ${eggsRoot} -rf`, echo);
|
|
30
36
|
}
|
|
31
37
|
exports.default = killMeSoftly;
|
|
@@ -34,7 +40,7 @@ exports.default = killMeSoftly;
|
|
|
34
40
|
* @param path
|
|
35
41
|
* @returns
|
|
36
42
|
*/
|
|
37
|
-
function
|
|
43
|
+
function haveBindedDirs(path) {
|
|
38
44
|
let retVal = false;
|
|
39
45
|
const dirs = [
|
|
40
46
|
'bin',
|
package/package.json
CHANGED
package/scripts/addaur.sh
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
################################
|
|
4
|
-
function press_a_key_to_continue {
|
|
5
|
-
read -rp "Press enter to continue or CTRL-C to abort."
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
function is_arch {
|
|
9
|
-
RELEASE=$(lsb_release -is)
|
|
10
|
-
if [ "$RELEASE" != "Arch" ]; then
|
|
11
|
-
echo "AUR is for Arch!"
|
|
12
|
-
exit
|
|
13
|
-
fi
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
function main {
|
|
17
|
-
clear
|
|
18
|
-
is_arch
|
|
19
|
-
echo "==============================="
|
|
20
|
-
echo "Add AUR repository to your Arch"
|
|
21
|
-
echo "==============================="
|
|
22
|
-
echo
|
|
23
|
-
press_a_key_to_continue
|
|
24
|
-
|
|
25
|
-
pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com
|
|
26
|
-
pacman-key --lsign-key 3056513887B78AEB
|
|
27
|
-
pacman -U 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst'
|
|
28
|
-
echo "[chaotic-aur]" >> /etc/pacman.conf
|
|
29
|
-
echo "Include = /etc/pacman.d/chaotic-mirrorlist" >> /etc/pacman.conf
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
main
|