# scripts for alpine images

## init.d/cryptsetup

unlock logs, firmware and appfs if they are luks-encrypted

note rootfs encryption is handled separately in initrd if required

## init.d/fsck_atlog

runs fsck on atlog at every boot. If there is a problem create a new one

## init.d/indicator_signals

turn off PWR_IND signal and turn on STDWN_INDICATOR on shutdown

## init.d/net-online-atmark

wait for any network interface to be up
(the original net-online from alpine waits for all configured
interfaces to be up)

## init.d/overlayfs

Make / mostly writable while keeping it read-only

Requirements:
 - add 'ro' to boot parameters (remove rw if present)
 - to keep / read-only, / needs to be listed as ro in /etc/fstab
 - if required, configure persistent_dev=mmcblkXpY in /etc/conf.d/overlayfs

Example:
```
(u-boot)
=> setenv mmcroot /dev/mmcblk0p2 rootwait ro
=> saveenv
(linux)
# cat >> /etc/fstab <<EOF
none		/		ext4	ro 0 0
none		/tmp		tmpfs	rw,nosuid,nodev 0 0
none		/var/tmp	tmpfs	rw,nosuid,nodev 0 0
EOF
# cp ... / chmod +x /etc/init.d/overlayfs
# rc-update add overlayfs sysinit
```

## init.d/reset_bootcount

reset bootcount value every boot

## init.d/zramswap

setup swap on zram

Note alpine comes with a zram-init package that does this and much more,
but that package depends on e2fsprogs-extra which we do not want: keep it
simple.

## tools/persist_file

Compagnion tool for overlayfs: copy file from the overlay into
the rootfs.
It is also possible to list changed files or other run apk directly
in rootfs, see help.

## tools/renameat2

utility to expore renameat2 RENAME_EXCHANGE flag, required to atomically swap two files

## tools/abos-ctrl

Command to rule them all -- regroup all common baseos specific commands in a single
script for users to find more easily

## podman

Podman helpers, see podman/README for details

## swupdate

Swupdate helpers, see swupdate/README for details
