Skip to content

Commit

Permalink
add logrotate config snippet
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Ammerlaan <[email protected]>
  • Loading branch information
Nowa-Ammerlaan committed Aug 1, 2024
1 parent b930a87 commit 569b6c5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
9 changes: 8 additions & 1 deletion installkernel-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,12 @@ pkg_setup() {
}

src_install() {
keepdir /etc/kernel/postinst.d
keepdir /etc/kernel/install.d
keepdir /etc/kernel/preinst.d
keepdir /etc/kernel/postinst.d
keepdir /usr/lib/kernel/install.d
keepdir /usr/lib/kernel/preinst.d
keepdir /usr/lib/kernel/postinst.d

exeinto /usr/lib/kernel/preinst.d
doexe hooks/99-check-diskspace.install
Expand Down Expand Up @@ -165,6 +169,9 @@ src_install() {
insinto /usr/lib/kernel
doins "${T}/install.conf"

insinto /etc/logrotate.d
newinst installkernel.logrotate installkernel

into /
dosbin installkernel
doman installkernel.8
Expand Down
10 changes: 10 additions & 0 deletions installkernel.logrotate
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/var/log/installkernel.log {
delaycompress
create
missingok
notifempty
postrotate
head -n1 $2 >> $1
tail -n1 $2 >> $1
endscript
}

0 comments on commit 569b6c5

Please sign in to comment.