penguins-eggs 9.0.16 → 9.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.
Files changed (85) hide show
  1. package/README.md +49 -27
  2. package/addons/{blissos → telos}/theme/applications/install-debian.desktop +0 -0
  3. package/addons/{blissos → telos}/theme/artwork/install-debian.png +0 -0
  4. package/addons/telos/theme/calamares/branding/banner.png +0 -0
  5. package/addons/telos/theme/calamares/branding/branding.desc +25 -0
  6. package/addons/telos/theme/calamares/branding/show.qml +51 -0
  7. package/addons/telos/theme/calamares/branding/slide1.png +0 -0
  8. package/addons/telos/theme/calamares/branding/telos-logo.png +0 -0
  9. package/addons/telos/theme/calamares/branding/welcome.png +0 -0
  10. package/addons/{blissos → telos}/theme/calamares/modules/partition.yml +0 -0
  11. package/addons/{blissos → telos}/theme/livecd/grub.theme.cfg +1 -1
  12. package/addons/{blissos → telos}/theme/livecd/isolinux.theme.cfg +1 -1
  13. package/addons/telos/theme/livecd/splash.png +0 -0
  14. package/addons/templates/grub.template +2 -0
  15. package/addons/waydroid/theme/applications/install-debian.desktop +28 -0
  16. package/addons/waydroid/theme/artwork/install-debian.png +0 -0
  17. package/addons/{blissos → waydroid}/theme/calamares/branding/branding.desc +0 -0
  18. package/addons/{blissos → waydroid}/theme/calamares/branding/languages.png +0 -0
  19. package/addons/{blissos → waydroid}/theme/calamares/branding/show.qml +0 -0
  20. package/addons/{blissos → waydroid}/theme/calamares/branding/slide1.png +0 -0
  21. package/addons/{blissos → waydroid}/theme/calamares/branding/slide2.png +0 -0
  22. package/addons/{blissos → waydroid}/theme/calamares/branding/slide3.png +0 -0
  23. package/addons/{blissos/theme/calamares/branding/blissos-logo.png → waydroid/theme/calamares/branding/waydroid-logo.png} +0 -0
  24. package/addons/{blissos → waydroid}/theme/calamares/branding/welcome.png +0 -0
  25. package/addons/waydroid/theme/calamares/modules/partition.yml +233 -0
  26. package/addons/waydroid/theme/livecd/grub.theme.cfg +43 -0
  27. package/addons/waydroid/theme/livecd/isolinux.theme.cfg +45 -0
  28. package/addons/{blissos → waydroid}/theme/livecd/splash.png +0 -0
  29. package/conf/distros/buster/calamares/calamares-modules/sources-yolk/sources-yolk.sh +57 -38
  30. package/lib/classes/daddy.js +7 -7
  31. package/lib/classes/distro.d.ts +4 -2
  32. package/lib/classes/distro.js +60 -76
  33. package/lib/classes/family/debian.js +2 -2
  34. package/lib/classes/i18n.js +2 -2
  35. package/lib/classes/incubation/fisherman-helper/packages.js +1 -1
  36. package/lib/classes/incubation/incubator.js +6 -1
  37. package/lib/classes/incubation/installer.d.ts +1 -1
  38. package/lib/classes/incubation/installer.js +2 -2
  39. package/lib/classes/krill_install.d.ts +56 -26
  40. package/lib/classes/krill_install.js +598 -357
  41. package/lib/classes/krill_prepare.d.ts +7 -3
  42. package/lib/classes/krill_prepare.js +62 -22
  43. package/lib/classes/ovary.d.ts +27 -27
  44. package/lib/classes/ovary.js +344 -370
  45. package/lib/classes/pacman.d.ts +1 -1
  46. package/lib/classes/pacman.js +21 -21
  47. package/lib/classes/pve-live.js +10 -14
  48. package/lib/classes/systemctl.d.ts +36 -7
  49. package/lib/classes/systemctl.js +63 -28
  50. package/lib/classes/utils.d.ts +14 -3
  51. package/lib/classes/utils.js +66 -19
  52. package/lib/classes/xdg.js +18 -34
  53. package/lib/classes/yolk.d.ts +12 -10
  54. package/lib/classes/yolk.js +50 -52
  55. package/lib/commands/install.d.ts +1 -0
  56. package/lib/commands/install.js +14 -3
  57. package/lib/commands/kill.js +1 -1
  58. package/lib/commands/produce.js +4 -4
  59. package/lib/commands/syncfrom.d.ts +9 -3
  60. package/lib/commands/syncfrom.js +38 -31
  61. package/lib/commands/syncto.d.ts +26 -6
  62. package/lib/commands/syncto.js +71 -48
  63. package/lib/components/elements/information.js +31 -12
  64. package/lib/components/partitions.d.ts +1 -2
  65. package/lib/components/partitions.js +1 -4
  66. package/lib/interfaces/i-devices.d.ts +1 -0
  67. package/lib/interfaces/i-distro.d.ts +4 -2
  68. package/lib/interfaces/i-installer.d.ts +1 -1
  69. package/lib/interfaces/i-krill.d.ts +0 -1
  70. package/lib/lib/cli-autologin.js +8 -3
  71. package/lib/lib/select_installation_device.js +1 -0
  72. package/lib/lib/select_installation_mode.js +1 -1
  73. package/manpages/doc/man/eggs.html +65 -6
  74. package/oclif.manifest.json +1 -1
  75. package/package.json +14 -13
  76. package/scripts/_eggs +9 -8
  77. package/scripts/bros/waydroid-helper.sh +1 -1
  78. package/scripts/eggs.bash +3 -3
  79. package/scripts/{not-used/install-eggs-ppa.sh → install-eggs-ppa.sh} +1 -0
  80. package/scripts/mom-cli.sh +1 -1
  81. package/scripts/{not-used/pve-live.sh → pve-live.sh} +2 -6
  82. package/scripts/userexist.sh +6 -0
  83. package/scripts/not-used/eggs-cleanup.sh +0 -7
  84. package/scripts/not-used/mkinitramfs +0 -469
  85. package/scripts/update-initramfs +0 -94
@@ -1,469 +0,0 @@
1
- #!/bin/sh
2
-
3
- umask 0022
4
- export PATH='/usr/bin:/sbin:/bin'
5
-
6
- # Defaults
7
- keep="n"
8
- CONFDIR="/etc/initramfs-tools"
9
- verbose="n"
10
- # Will be updated by busybox's conf hook, if present
11
- BUSYBOXDIR=
12
- export BUSYBOXDIR
13
-
14
- usage()
15
- {
16
- cat << EOF
17
-
18
- Usage: mkinitramfs [option]... -o outfile [version]
19
-
20
- Options:
21
- -c compress Override COMPRESS setting in initramfs.conf.
22
- -d confdir Specify an alternative configuration directory.
23
- -k Keep temporary directory used to make the image.
24
- -o outfile Write to outfile.
25
- -r root Override ROOT setting in initramfs.conf.
26
-
27
- See mkinitramfs(8) for further details.
28
-
29
- EOF
30
- }
31
-
32
- usage_error()
33
- {
34
- usage >&2
35
- exit 2
36
- }
37
-
38
- OPTIONS=$(getopt -o c:d:hko:r:v --long help -n "$0" -- "$@") || usage_error
39
-
40
- eval set -- "$OPTIONS"
41
-
42
- while true; do
43
- case "$1" in
44
- -c)
45
- compress="$2"
46
- shift 2
47
- ;;
48
- -d)
49
- CONFDIR="$2"
50
- shift 2
51
- if [ ! -d "${CONFDIR}" ]; then
52
- echo "${0}: ${CONFDIR}: Not a directory" >&2
53
- exit 1
54
- fi
55
- ;;
56
- -h|--help)
57
- usage
58
- exit 0
59
- ;;
60
- -o)
61
- outfile="$2"
62
- shift 2
63
- ;;
64
- -k)
65
- keep="y"
66
- shift
67
- ;;
68
- -r)
69
- ROOT="$2"
70
- shift 2
71
- ;;
72
- -v)
73
- verbose="y"
74
- shift
75
- ;;
76
- --)
77
- shift
78
- break
79
- ;;
80
- *)
81
- echo "Internal error!" >&2
82
- exit 1
83
- ;;
84
- esac
85
- done
86
-
87
- # For dependency ordered mkinitramfs hook scripts.
88
- . /usr/share/initramfs-tools/scripts/functions
89
- . /usr/share/initramfs-tools/hook-functions
90
-
91
- . "${CONFDIR}/initramfs.conf"
92
-
93
- EXTRA_CONF=''
94
- maybe_add_conf() {
95
- if [ -e "$1" ] && \
96
- basename "$1" \
97
- | grep '^[[:alnum:]][[:alnum:]\._-]*$' \
98
- | grep -qv '\.dpkg-.*$'; then
99
- if [ -d "$1" ]; then
100
- echo "W: $1 is a directory instead of file" >&2
101
- else
102
- EXTRA_CONF="${EXTRA_CONF} $1"
103
- . "$1"
104
- fi
105
- fi
106
- }
107
- for i in /usr/share/initramfs-tools/conf.d/*; do
108
- # Configuration files in /etc mask those in /usr/share
109
- if ! [ -e "${CONFDIR}"/conf.d/"$(basename "${i}")" ]; then
110
- maybe_add_conf "${i}"
111
- fi
112
- done
113
- for i in "${CONFDIR}"/conf.d/*; do
114
- maybe_add_conf "${i}"
115
- done
116
-
117
- # source package confs
118
- for i in /usr/share/initramfs-tools/conf-hooks.d/*; do
119
- if [ -d "${i}" ]; then
120
- echo "W: ${i} is a directory instead of file." >&2
121
- elif [ -e "${i}" ]; then
122
- . "${i}"
123
- fi
124
- done
125
-
126
- # Check busybox dependency
127
- if [ "${BUSYBOX}" = "y" ] && [ -z "${BUSYBOXDIR}" ]; then
128
- echo >&2 "E: busybox or busybox-static, version 1:1.22.0-17~ or later, is required but not installed"
129
- exit 1
130
- fi
131
-
132
- if [ -n "${UMASK:-}" ]; then
133
- umask "${UMASK}"
134
- fi
135
-
136
- if [ -z "${outfile}" ]; then
137
- usage_error
138
- fi
139
-
140
- touch "$outfile"
141
- outfile="$(readlink -f "$outfile")"
142
-
143
- # And by "version" we really mean path to kernel modules
144
- # This is braindead, and exists to preserve the interface with mkinitrd
145
- if [ ${#} -ne 1 ]; then
146
- version="$(uname -r)"
147
- else
148
- version="${1}"
149
- fi
150
-
151
- case "${version}" in
152
- /lib/modules/*/[!/]*)
153
- ;;
154
- /lib/modules/[!/]*)
155
- version="${version#/lib/modules/}"
156
- version="${version%%/*}"
157
- ;;
158
- esac
159
-
160
- case "${version}" in
161
- */*)
162
- echo "$PROG: ${version} is not a valid kernel version" >&2
163
- exit 2
164
- ;;
165
- esac
166
-
167
- if [ -z "${compress:-}" ]; then
168
- compress=${COMPRESS?}
169
- fi
170
- unset COMPRESS
171
-
172
- if ! command -v "${compress}" >/dev/null 2>&1; then
173
- compress=gzip
174
- [ "${verbose}" = y ] && \
175
- echo "No ${compress} in ${PATH}, using gzip"
176
- fi
177
-
178
- case "${compress}" in
179
- gzip) # If we're doing a reproducible build, use gzip -n
180
- if [ -n "${SOURCE_DATE_EPOCH}" ]; then
181
- compress="gzip -n"
182
- # Otherwise, substitute pigz if it's available
183
- elif command -v pigz >/dev/null; then
184
- compress=pigz
185
- fi
186
- ;;
187
- lz4) compress="lz4 -9 -l" ;;
188
- xz) compress="xz --check=crc32" ;;
189
- bzip2|lzma|lzop)
190
- # no parameters needed
191
- ;;
192
- *) echo "W: Unknown compression command ${compress}" >&2 ;;
193
- esac
194
-
195
- if [ -d "${outfile}" ]; then
196
- echo "${outfile} is a directory" >&2
197
- exit 1
198
- fi
199
-
200
- MODULESDIR="/lib/modules/${version}"
201
-
202
- if [ ! -e "${MODULESDIR}" ]; then
203
- echo "W: missing ${MODULESDIR}" >&2
204
- echo "W: Ensure all necessary drivers are built into the linux image!" >&2
205
- fi
206
- if [ ! -e "${MODULESDIR}/modules.dep" ]; then
207
- depmod "${version}"
208
- fi
209
-
210
- # Prepare to clean up temporary files on exit
211
- DESTDIR=
212
- __TMPCPIOGZ=
213
- __TMPEARLYCPIO=
214
- clean_on_exit() {
215
- if [ "${keep}" = "y" ]; then
216
- echo "Working files in ${DESTDIR:-<not yet created>}, early initramfs in ${__TMPEARLYCPIO:-<not yet created>} and overlay in ${__TMPCPIOGZ:-<not yet created>}"
217
- else
218
- for path in "${DESTDIR}" "${__TMPCPIOGZ}" "${__TMPEARLYCPIO}"; do
219
- test -z "${path}" || rm -rf "${path}"
220
- done
221
- fi
222
- }
223
- trap clean_on_exit EXIT
224
- trap "exit 1" INT TERM # makes the EXIT trap effective even when killed
225
-
226
- # Create temporary directory and files for initramfs contents
227
- [ -n "${TMPDIR}" ] && [ ! -w "${TMPDIR}" ] && unset TMPDIR
228
- DESTDIR="$(mktemp -d "${TMPDIR:-/var/tmp}/mkinitramfs_XXXXXX")" || exit 1
229
- chmod 755 "${DESTDIR}"
230
- __TMPCPIOGZ="$(mktemp "${TMPDIR:-/var/tmp}/mkinitramfs-OL_XXXXXX")" || exit 1
231
- __TMPEARLYCPIO="$(mktemp "${TMPDIR:-/var/tmp}/mkinitramfs-FW_XXXXXX")" || exit 1
232
-
233
- DPKG_ARCH=$(dpkg --print-architecture)
234
-
235
- # Export environment for hook scripts.
236
- #
237
- export MODULESDIR
238
- export version
239
- export CONFDIR
240
- export DESTDIR
241
- export DPKG_ARCH
242
- export verbose
243
- export KEYMAP
244
- export MODULES
245
- export BUSYBOX
246
- export RESUME
247
-
248
- # Private, used by 'catenate_cpiogz'.
249
- export __TMPCPIOGZ
250
-
251
- # Private, used by 'prepend_earlyinitramfs'.
252
- export __TMPEARLYCPIO
253
-
254
- # Create usr-merged filesystem layout, to avoid duplicates if the host
255
- # filesystem is usr-merged.
256
- for d in /bin /lib* /sbin; do
257
- mkdir -p "${DESTDIR}/usr${d}"
258
- ln -s "usr${d}" "${DESTDIR}${d}"
259
- done
260
- for d in conf/conf.d etc run scripts ${MODULESDIR}; do
261
- mkdir -p "${DESTDIR}/${d}"
262
- done
263
-
264
- # Copy in modules.builtin and modules.order (not generated by depmod)
265
- for x in modules.builtin modules.order; do
266
- if [ -f "${MODULESDIR}/${x}" ]; then
267
- cp -p "${MODULESDIR}/${x}" "${DESTDIR}${MODULESDIR}/${x}"
268
- fi
269
- done
270
-
271
- # MODULES=list case. Always honour.
272
- for x in "${CONFDIR}/modules" /usr/share/initramfs-tools/modules.d/*; do
273
- if [ -f "${x}" ]; then
274
- add_modules_from_file "${x}"
275
- fi
276
- done
277
-
278
- # MODULES=most is default
279
- case "${MODULES}" in
280
- dep)
281
- dep_add_modules
282
- ;;
283
- most)
284
- auto_add_modules
285
- ;;
286
- netboot)
287
- auto_add_modules base
288
- auto_add_modules net
289
- ;;
290
- list)
291
- # nothing to add
292
- ;;
293
- *)
294
- echo "W: mkinitramfs: unsupported MODULES setting: ${MODULES}." >&2
295
- echo "W: mkinitramfs: Falling back to MODULES=most." >&2
296
- auto_add_modules
297
- ;;
298
- esac
299
-
300
- # Resolve hidden dependencies
301
- hidden_dep_add_modules
302
-
303
- # First file executed by linux
304
- cp -p /usr/share/initramfs-tools/init "${DESTDIR}/init"
305
-
306
- # add existant boot scripts
307
- for b in $(cd /usr/share/initramfs-tools/scripts/ && find . \
308
- -regextype posix-extended -regex '.*/[[:alnum:]\._-]+$' -type f); do
309
- [ -d "${DESTDIR}/scripts/$(dirname "${b}")" ] \
310
- || mkdir -p "${DESTDIR}/scripts/$(dirname "${b}")"
311
- cp -p "/usr/share/initramfs-tools/scripts/${b}" \
312
- "${DESTDIR}/scripts/$(dirname "${b}")/"
313
- done
314
- # Prune dot-files/directories and limit depth to exclude VCS files
315
- for b in $(cd "${CONFDIR}/scripts" && find . -maxdepth 2 -name '.?*' -prune -o \
316
- -regextype posix-extended -regex '.*/[[:alnum:]\._-]+$' -type f -print); do
317
- [ -d "${DESTDIR}/scripts/$(dirname "${b}")" ] \
318
- || mkdir -p "${DESTDIR}/scripts/$(dirname "${b}")"
319
- cp -p "${CONFDIR}/scripts/${b}" "${DESTDIR}/scripts/$(dirname "${b}")/"
320
- done
321
-
322
- echo "DPKG_ARCH=${DPKG_ARCH}" > "${DESTDIR}/conf/arch.conf"
323
- cp -p "${CONFDIR}/initramfs.conf" "${DESTDIR}/conf"
324
- for i in ${EXTRA_CONF}; do
325
- copy_file config "${i}" /conf/conf.d
326
- done
327
-
328
- # ROOT hardcoding
329
- if [ -n "${ROOT:-}" ]; then
330
- echo "ROOT=${ROOT}" > "${DESTDIR}/conf/conf.d/root"
331
- fi
332
-
333
- if ! command -v ldd >/dev/null 2>&1 ; then
334
- echo "E: no ldd around - install libc-bin" >&2
335
- exit 1
336
- fi
337
-
338
- # fstab and mtab
339
- touch "${DESTDIR}/etc/fstab"
340
- ln -s /proc/mounts "${DESTDIR}/etc/mtab"
341
-
342
- # module-init-tools
343
- copy_exec /sbin/modprobe /sbin
344
- copy_exec /sbin/rmmod /sbin
345
- mkdir -p "${DESTDIR}/etc/modprobe.d" "${DESTDIR}/lib/modprobe.d"
346
- for file in /etc/modprobe.d/*.conf /lib/modprobe.d/*.conf ; do
347
- if test -e "$file" || test -L "$file" ; then
348
- copy_file config "$file"
349
- fi
350
- done
351
-
352
- # workaround: libgcc always needed on old-abi arm
353
- if [ "$DPKG_ARCH" = arm ] || [ "$DPKG_ARCH" = armeb ]; then
354
- cp -a /lib/libgcc_s.so.1 "${DESTDIR}/lib/"
355
- fi
356
-
357
- run_scripts /usr/share/initramfs-tools/hooks
358
- run_scripts "${CONFDIR}"/hooks
359
-
360
- # Avoid double sleep when using older udev scripts
361
- # shellcheck disable=SC2016
362
- sed -i 's/^\s*sleep \$ROOTDELAY$/:/' "${DESTDIR}/scripts/init-top/udev"
363
-
364
- # cache boot run order
365
- for b in $(cd "${DESTDIR}/scripts" && find . -mindepth 1 -type d); do
366
- cache_run_scripts "${DESTDIR}" "/scripts/${b#./}"
367
- done
368
-
369
- # generate module deps
370
- depmod -a -b "${DESTDIR}" "${version}"
371
- rm -f "${DESTDIR}/lib/modules/${version}"/modules.*map
372
-
373
- # make sure that library search path is up to date
374
- cp -ar /etc/ld.so.conf* "$DESTDIR"/etc/
375
- if ! ldconfig -r "$DESTDIR" ; then
376
- [ "$(id -u)" != "0" ] \
377
- && echo "ldconfig might need uid=0 (root) for chroot()" >&2
378
- fi
379
- # The auxiliary cache is not reproducible and is always invalid at boot
380
- # (see #845034)
381
- if [ -d "${DESTDIR}"/var/cache/ldconfig ]; then
382
- rm -f "${DESTDIR}"/var/cache/ldconfig/aux-cache
383
- rmdir --ignore-fail-on-non-empty "${DESTDIR}"/var/cache/ldconfig
384
- fi
385
-
386
- # Apply DSDT to initramfs
387
- if [ -e "${CONFDIR}/DSDT.aml" ]; then
388
- copy_file DSDT "${CONFDIR}/DSDT.aml"
389
- fi
390
-
391
- # Make sure there is a final sh in initramfs
392
- if [ ! -e "${DESTDIR}/bin/sh" ]; then
393
- copy_exec /bin/sh "${DESTDIR}/bin/"
394
- fi
395
-
396
- # dirty hack for armhf's double-linker situation; if we have one of
397
- # the two known eglibc linkers, nuke both and re-create sanity
398
- if [ "$DPKG_ARCH" = armhf ]; then
399
- if [ -e "${DESTDIR}/lib/arm-linux-gnueabihf/ld-linux.so.3" ] || \
400
- [ -e "${DESTDIR}/lib/ld-linux-armhf.so.3" ]; then
401
- rm -f "${DESTDIR}/lib/arm-linux-gnueabihf/ld-linux.so.3"
402
- rm -f "${DESTDIR}/lib/ld-linux-armhf.so.3"
403
- cp -aL /lib/ld-linux-armhf.so.3 "${DESTDIR}/lib/"
404
- ln -sf /lib/ld-linux-armhf.so.3 "${DESTDIR}/lib/arm-linux-gnueabihf/ld-linux.so.3"
405
- fi
406
- fi
407
-
408
- [ "${verbose}" = y ] && echo "Building cpio ${outfile} initramfs"
409
-
410
- if [ -s "${__TMPEARLYCPIO}" ]; then
411
- cat "${__TMPEARLYCPIO}" >"${outfile}" || exit 1
412
- else
413
- # truncate
414
- true > "${outfile}"
415
- fi
416
-
417
- (
418
- # preserve permissions if root builds the image, see #633582
419
- [ "$(id -ru)" != 0 ] && cpio_owner_root="-R 0:0"
420
-
421
- # if SOURCE_DATE_EPOCH is set, try and create a reproducible image
422
- if [ -n "${SOURCE_DATE_EPOCH}" ]; then
423
- # ensure that no timestamps are newer than $SOURCE_DATE_EPOCH
424
- find "${DESTDIR}" -newermt "@${SOURCE_DATE_EPOCH}" -print0 | \
425
- xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}"
426
-
427
- # --reproducible requires cpio >= 2.12
428
- cpio_reproducible="--reproducible"
429
- fi
430
-
431
- # work around lack of "set -o pipefail" for the following pipe:
432
- # cd "${DESTDIR}" && find . | LC_ALL=C sort | cpio --quiet $cpio_owner_root $cpio_reproducible -o -H newc | gzip >>"${outfile}" || exit 1
433
- ec1=1
434
- ec2=1
435
- ec3=1
436
- exec 3>&1
437
- eval "$(
438
- # http://cfaj.freeshell.org/shell/cus-faq-2.html
439
- exec 4>&1 >&3 3>&-
440
- cd "${DESTDIR}"
441
- {
442
- find . 4>&-; echo "ec1=$?;" >&4
443
- } | {
444
- LC_ALL=C sort
445
- } | {
446
- # shellcheck disable=SC2086
447
- cpio --quiet $cpio_owner_root $cpio_reproducible -o -H newc 4>&-; echo "ec2=$?;" >&4
448
- } | ${compress} >>"${outfile}"
449
- echo "ec3=$?;" >&4
450
- )"
451
- if [ "$ec1" -ne 0 ]; then
452
- echo "E: mkinitramfs failure find $ec1 cpio $ec2 $compress $ec3" >&2
453
- exit "$ec1"
454
- fi
455
- if [ "$ec2" -ne 0 ]; then
456
- echo "E: mkinitramfs failure cpio $ec2 $compress $ec3" >&2
457
- exit "$ec2"
458
- fi
459
- if [ "$ec3" -ne 0 ]; then
460
- echo "E: mkinitramfs failure $compress $ec3" >&2
461
- exit "$ec3"
462
- fi
463
- ) || exit 1
464
-
465
- if [ -s "${__TMPCPIOGZ}" ]; then
466
- cat "${__TMPCPIOGZ}" >>"${outfile}" || exit 1
467
- fi
468
-
469
- exit 0
@@ -1,94 +0,0 @@
1
- #!/bin/sh
2
-
3
- # live-tools(7) - System Support Scripts
4
- # Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
5
- #
6
- # This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
7
- # This is free software, and you are welcome to redistribute it
8
- # under certain conditions; see COPYING for details.
9
-
10
- set -e
11
-
12
- if [ ! -e /usr/sbin/update-initramfs.orig.initramfs-tools ]
13
- then
14
- echo "E: /usr/sbin/update-initramfs.orig.initramfs-tools - command not found"
15
- echo "E: On Debian based systems, update-initramfs from initramfs-tools"
16
- echo "E: can be installed with:"
17
- echo "E: apt-get install initramfs-tools"
18
-
19
- exit 1
20
- fi
21
-
22
- # system is a live system and not a system in the process of being built by live-build
23
- if [ ! -e /.live-build ] && grep -qs "boot=live" /proc/cmdline
24
- then
25
- if grep -qs "\/lib\/live\/mount\/medium" /proc/mounts
26
- then
27
- # live system with live media mounted as /lib/live/mount/medium
28
- _DEVICE="$(awk '/\/lib\/live\/mount\/medium/ { print $1 }' /proc/mounts)"
29
-
30
- mount -o remount,rw ${_DEVICE} > /dev/null 2>&1 || true
31
-
32
- if touch /lib/live/mount/medium/.test > /dev/null 2>&1
33
- then
34
- _READ_WRITE="true"
35
-
36
- rm -f /lib/live/mount/medium/.test
37
- else
38
- _READ_WRITE="false"
39
- fi
40
- else
41
- # live system without live media mounted as /lib/live/mount/medium
42
- echo "I: update-initramfs is disabled (live system is running without media mounted on /lib/live/mount/medium)."
43
-
44
- exit 0
45
- fi
46
- else
47
- # non-live system
48
- /usr/sbin/update-initramfs.orig.initramfs-tools "${@}"
49
-
50
- exit "${?}"
51
- fi
52
-
53
- case "${_READ_WRITE}" in
54
- true)
55
- # Updating initramfs
56
- /usr/sbin/update-initramfs.orig.initramfs-tools "${@}"
57
-
58
- if [ "$(ls /boot/vmlinuz-* | wc -l)" -gt 1 ]
59
- then
60
- _NUMBER="1"
61
-
62
- for _VMLINUZ in /boot/vmlinuz-*
63
- do
64
- _VERSION="$(basename ${_VMLINUZ} | sed -e 's|vmlinuz-||')"
65
-
66
- cp /boot/vmlinuz-${_VERSION} /lib/live/mount/medium/live/vmlinuz${_NUMBER}.new
67
- if [ -e /boot/initrd.img-${_VERSION} ]; then
68
- cp /boot/initrd.img-${_VERSION} /lib/live/mount/medium/live/initrd${_NUMBER}.img.new
69
- fi
70
-
71
- _NUMBER="$((${_NUMBER} + 1))"
72
- done
73
- else
74
- _VMLINUZ=$(echo /boot/vmlinuz-*)
75
- _VERSION="$(basename ${_VMLINUZ} | sed -e 's|vmlinuz-||')"
76
- cp $_VMLINUZ /lib/live/mount/medium/live/vmlinuz.new
77
- if [ -e /boot/initrd.img-${_VERSION} ]; then
78
- cp /boot/initrd.img-${_VERSION} /lib/live/mount/medium/live/initrd.img.new
79
- fi
80
-
81
- fi
82
- for f in /lib/live/mount/medium/live/vmlinuz*.new \
83
- /lib/live/mount/medium/live/initrd*.new; do
84
- if [ -e $f ]; then
85
- mv $f ${f%.new}
86
- fi
87
- done
88
- ;;
89
-
90
- false)
91
- echo "I: update-initramfs is disabled (live system is running on read-only media)."
92
- exit 0
93
- ;;
94
- esac