Feat: add systemd preset
All checks were successful
Build package / build-package (push) Successful in 8s

- fix: install might failed when in chrooted environment
This commit is contained in:
2025-07-29 02:13:36 +08:00
parent 8f9aa522c7
commit 5520dcdaf6
3 changed files with 9 additions and 3 deletions

4
60-hl-base-env.preset Normal file
View File

@@ -0,0 +1,4 @@
enable systemd-resolved
enable systemd-networkd
enable systemd-timesyncd
enable sshd

View File

@@ -1,7 +1,7 @@
# Maintainer: Yi-Ting Shih <ytshih@konchin.com> # Maintainer: Yi-Ting Shih <ytshih@konchin.com>
pkgname=hl-base-env pkgname=hl-base-env
pkgver=1.0.3 pkgver=1.1.0
pkgrel=2 pkgrel=1
pkgdesc="Base environment for konchin.com homelab" pkgdesc="Base environment for konchin.com homelab"
arch=(any) arch=(any)
url="https://gitea.konchin.com/package/hl-base-env" url="https://gitea.konchin.com/package/hl-base-env"
@@ -16,6 +16,7 @@ depends=(
install="$pkgname.install" install="$pkgname.install"
source=( source=(
"60-$pkgname.conf" "60-$pkgname.conf"
"60-$pkgname.preset"
"61-$pkgname.hook" "61-$pkgname.hook"
'install.sh' 'install.sh'
'90-editor.sh' '90-editor.sh'
@@ -27,6 +28,7 @@ package() {
cd "$srcdir" cd "$srcdir"
install -Dm644 "60-$pkgname.conf" "$pkgdir/etc/systemd/resolved.conf.d/60-$pkgname.conf" install -Dm644 "60-$pkgname.conf" "$pkgdir/etc/systemd/resolved.conf.d/60-$pkgname.conf"
install -Dm644 "60-$pkgname.preset" "$pkgdir/etc/systemd/system-preset/60-$pkgname.preset"
install -Dm644 "61-$pkgname.hook" "$pkgdir/etc/pacman.d/hooks/61-$pkgname.hook" install -Dm644 "61-$pkgname.hook" "$pkgdir/etc/pacman.d/hooks/61-$pkgname.hook"
install -Dm755 install.sh "$pkgdir/usr/lib/$pkgname/install.sh" install -Dm755 install.sh "$pkgdir/usr/lib/$pkgname/install.sh"
install -Dm644 90-editor.sh "$pkgdir/etc/profile.d/90-editor.sh" install -Dm644 90-editor.sh "$pkgdir/etc/profile.d/90-editor.sh"
@@ -34,6 +36,7 @@ package() {
install -Dm644 timesyncd.conf "$pkgdir/etc/systemd/timesyncd.conf.d/$pkgname.conf" install -Dm644 timesyncd.conf "$pkgdir/etc/systemd/timesyncd.conf.d/$pkgname.conf"
} }
sha256sums=('164d84a6db866f8445d8cd2b92a6513de4b8fd0204e4d127432416f13032890b' sha256sums=('164d84a6db866f8445d8cd2b92a6513de4b8fd0204e4d127432416f13032890b'
'50096a88a2457d391e6c5b7fd508c9646190a8c2db8f6c8c54c382d666468756'
'60f8e5f6420163be4489c15f4c1e936b5b728005f18fd5e7fa4f711789fd990b' '60f8e5f6420163be4489c15f4c1e936b5b728005f18fd5e7fa4f711789fd990b'
'9d3f3962e7088ed30962d171536d81e042169ee5c3c46e3f7995eb53b27e71f5' '9d3f3962e7088ed30962d171536d81e042169ee5c3c46e3f7995eb53b27e71f5'
'8df871b1727d147ecc410de3aa6cf24e5bf046f1bfb4b600b60c40acd6c4fa9a' '8df871b1727d147ecc410de3aa6cf24e5bf046f1bfb4b600b60c40acd6c4fa9a'

View File

@@ -1,7 +1,6 @@
_package_changed() { _package_changed() {
trust anchor --store /usr/share/hl-base-env/hl-rootca.crt trust anchor --store /usr/share/hl-base-env/hl-rootca.crt
update-ca-trust update-ca-trust
systemctl enable --now systemd-timesyncd.service
} }
post_install() { post_install() {