Add akshara.install, update akshara.hook
This commit is contained in:
parent
5f62b2f59a
commit
038f5d2abf
2 changed files with 36 additions and 0 deletions
18
akshara.hook
18
akshara.hook
|
@ -9,6 +9,11 @@ run_latehook() {
|
|||
mv /new_root/usr /new_root/.old.usr
|
||||
mv /new_root/mnt/iso-update/squashfs-root/usr /new_root/usr
|
||||
|
||||
# Same for /var/lib.
|
||||
mv /new_root/var/lib /new_root/.old.var.lib
|
||||
mv /new_root/mnt/iso-update/squashfs-root/var/lib /new_root/var
|
||||
|
||||
# Move to /etc stage.
|
||||
rm -f /new_root/mnt/iso-update/.ready-for-update
|
||||
touch /new_root/mnt/iso-update/.etc-stage
|
||||
fi
|
||||
|
@ -23,5 +28,18 @@ run_latehook() {
|
|||
|
||||
# Only copy non-existent files.
|
||||
cp -a -n /new_root/mnt/iso-update/squashfs-root/etc/* /new_root/etc
|
||||
|
||||
# Update pacman config.
|
||||
cp /new_root/mnt/iso-update/squashfs-root/etc/pacman.conf /new_root/etc
|
||||
rm -rf /new_root/etc/pacman.d
|
||||
cp -r /new_root/mnt/iso-update/squashfs-root/etc/pacman.d /new_root/etc
|
||||
|
||||
# Successful update.
|
||||
rm -f /new_root/mnt/iso-update/.etc-stage
|
||||
touch /new_root/mnt/iso-update/.successful-update
|
||||
fi
|
||||
|
||||
# Create overlay directories
|
||||
rm -rf /new_root/.blend-overlays /new_root/.blendrw
|
||||
mkdir -p /new_root/.blend-overlays/{usr,varlib,etcpacman}
|
||||
}
|
||||
|
|
18
akshara.install
Normal file
18
akshara.install
Normal file
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: GPL-3.0
|
||||
|
||||
build() {
|
||||
add_module overlay
|
||||
add_binary bash
|
||||
add_binary findmnt
|
||||
add_runscript
|
||||
}
|
||||
|
||||
help() {
|
||||
cat <<HELPEOF
|
||||
This hook handles system updates and overlays. No
|
||||
configuration is needed.
|
||||
HELPEOF
|
||||
}
|
||||
|
||||
# vim: set ft=sh ts=4 sw=4 et:
|
Loading…
Reference in a new issue