Feat: add resolv.conf symlink #3

Merged
ytshih merged 3 commits from 2-resolvconf into main 2025-07-28 23:33:00 +08:00
3 changed files with 19 additions and 0 deletions
Showing only changes of commit c1a855682c - Show all commits

10
61-hl-base-env.hook Normal file
View File

@@ -0,0 +1,10 @@
[Trigger]
Type = Path
Operation = Install
Operation = Upgrade
Target = etc/resolv.conf
[Action]
Description = Override configuration files...
When = PostTransaction
Exec = /usr/lib/hl-base-env/install.sh

View File

@@ -14,6 +14,8 @@ depends=(
install="$pkgname.install"
source=(
"60-$pkgname.conf"
"61-$pkgname.hook"
'install.sh'
'90-editor.sh'
'hl-rootca.crt'
)
@@ -22,9 +24,13 @@ package() {
cd "$srcdir"
install -Dm644 "60-$pkgname.conf" "$pkgdir/etc/systemd/resolved.conf.d/60-$pkgname.conf"
install -Dm755 "61-$pkgname.hook" "$pkgdir/etc/pacman.d/hooks/61-$pkgname.hook"
install -Dm644 install.sh "$pkgdir/usr/lib/$pkgname/install.sh"
install -Dm644 90-editor.sh "$pkgdir/etc/profile.d/90-editor.sh"
install -Dm644 hl-rootca.crt "$pkgdir/usr/share/$pkgname/hl-rootca.crt"
}
sha256sums=('164d84a6db866f8445d8cd2b92a6513de4b8fd0204e4d127432416f13032890b'
'453cbec2e5fa38ac9ef618d3254ba4f5fc8aacdc8bb1f17dad00f6089680d580'
'29eb6911bc0d7842385bf19b0405ee6fd354f263de817b759f0b27f80030c6db'
'8df871b1727d147ecc410de3aa6cf24e5bf046f1bfb4b600b60c40acd6c4fa9a'
'1bcae0144eb86eae3948eae7299c99f0b1fc53d0f47884da6dfcaddab503a382')

3
install.sh Normal file
View File

@@ -0,0 +1,3 @@
#!/usr/bin/env -S bash
ln -sf ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf