diff options
Diffstat (limited to 'virtual')
-rw-r--r-- | virtual/miller-base/Manifest | 7 | ||||
-rwxr-xr-x | virtual/miller-base/files/kernels-cleaner | 8 | ||||
-rwxr-xr-x | virtual/miller-base/files/newkernel | 13 | ||||
-rwxr-xr-x | virtual/miller-base/files/systemd-reload | 4 | ||||
-rwxr-xr-x | virtual/miller-base/files/weekly-av-scan.cron | 59 | ||||
-rw-r--r-- | virtual/miller-base/miller-base-10.4.ebuild (renamed from virtual/miller-base/miller-base-10.3-r3.ebuild) | 6 |
6 files changed, 79 insertions, 18 deletions
diff --git a/virtual/miller-base/Manifest b/virtual/miller-base/Manifest index 1892f16..e5529bb 100644 --- a/virtual/miller-base/Manifest +++ b/virtual/miller-base/Manifest @@ -1,13 +1,16 @@ AUX auto-download-packages 81 SHA256 0ec31222dc2d7b7dac658faffed8b971d9ee6710811c6eefe0145e4ed4c95792 SHA512 ce5a4d320fa33cceaacd6f446340026d14da04a91b57cfe1bc78d026487748b6644d04d30a3d904af416e8914dd69f0dcfb89267011da59e7084f78f74f8a1b7 WHIRLPOOL 550f0108b061b0ca35a7513e5f85a969308b1eae7741282e8362542fb9eee0b3faa87b774e5b59a40fea10c99def8112b75a9cfb8b614fc1944887b2b7f35d3b AUX auto-update-overlays 25 SHA256 98ce8786c0fb1612bb1778a2ee0aea88728b7d74929650a5b249bc0e05d3abdd SHA512 70e69f299817b93debbffd0ea7d05cb8fe00be21d8103bf70024fd07443fb3abe3cebe32003128e9d241463b6eb954c98d335d8040a35a0035f05f93b99678d1 WHIRLPOOL 4140a9ffd1ff024260bded5ad5edc7bbb90a755be1b2b4703769d18e83000c8834deaa60aa10e8aebc5b5d03353bfb1a4065c830d481778c46314949ae60363f AUX daily-av-update.cron 31 SHA256 1b83ac59e56ffbc3ec1c0f42c3c43de2b0cf9485690292a7dcb3440d529d0f78 SHA512 cf742cab1cf6129dffdd3c48003f54700227ff1a91458383d1afd73c93bcb981a284933ebf7997bf8cb6a26f9fc08ca3d40591a711c6cfbcb1fd830e8a022dff WHIRLPOOL 80ddba88db28f1c1235f81247815021dd7a4215bdcf0d3b9472843779ffa151d5f714a78ba20a683b8dec4c13df64c132f6380bc15a2f828dca3dd5f3c3d5beb +AUX kernels-cleaner 155 SHA256 436ca198c1f0c9aa544adb527db2f304a2e7271667a5863c6a7af5d092dc3b56 SHA512 2ec348839d632ecffa7963bbd15d843f9e434b238a26ca4ab0cc3012c049343a0905c90750a55b3ee2bbe9b316f2abdcea774f36584915e81f257e4a22709645 WHIRLPOOL b5a4fc2f5c457ffca28f997180b67209e1b9697a901bdf7c2ac906fb595905e650243d1cb0f3e8b3eee972be611679f43eef1fe1919838255724acda6fc9646f +AUX newkernel 301 SHA256 869ebc9260b81e07a57d3bc7a2997c9252fa3e8de830bc593f7b15b74c6db7a0 SHA512 d338d1604c6ff6ad963187da6bf63d2c25c3286f60bc61301d4f516bcdc4becae99234f663aab171c582804792133d7c4ece755db8967b70a2e85d23ba91bc48 WHIRLPOOL 43ff64d037114b2e60f789fd8444e33a130f78795f64516eabcdddda028b5a47b02617c8ada03f848b159141f5c4bcb226cfd84257d7b0b525c93a19112f0ca2 AUX service-check.openrc 28 SHA256 c15c00ba79267a7b47c73a361226f263c852f94ba3096582bb3879f82f4fcdef SHA512 486e527013f694dd543d4ac877058a3f4c45a2879c2fb82519223a4aef52446e5c370892aae2d7a75766a77e47024086ec15573d1aee131b91437ad2acf4433f WHIRLPOOL c1b4806deb1ad4963089b5fb7bc14a202e206616b9eac645f1603813f60e745cfeb2370128dbd7904f75f821262f215eae61adc729d9014c979768429e15c289 AUX service-check.systemd 54 SHA256 0b30767a9ae16c85275ce88861c8528f11f65ad52bdbb50c87e52adc41a4a888 SHA512 89bd6a5acbc99c4a6fa958dcdbd0dda09128d1ac0e50b5e312283b3dc396154fe1b5a18092994817153b80fd4a7df9ab4e86d5f958aa5ad5f2fab26303c44dc6 WHIRLPOOL 332e6780cf2b7daf2c524574c389131c7f5a889950315703da093d226a1fbec70112e70895c207c5c8f8dfe1797334dc3b129e8391a6741e464dcbb5c23a1569 AUX sync-distclean-exec.cron 60 SHA256 043df18d533148d33abe2f2cf588953b0193c4a47ea0a428e5e2d531ee4d5d0e SHA512 e8075f330b879f3888f47086e5fdd0144be7decbe264a105e5071f851065bd6eb55a22be6fb4eb90a4e3bca00e76fee79f372adc5c3a8f25660c61bd9379ab0f WHIRLPOOL f1afae03bdf094cb08d3389cf329d10debd89c73f360c0e16f686cc267eb49c1e5780bbfe78fdd8518c9cdba1cefe6849b598c9f8d5da667516d705bd650c966 +AUX systemd-reload 38 SHA256 1330d4fdb021f86e92a15a8c9498ae4803d4fd88f0ef4aeb30789d4529741af0 SHA512 ffbf5b57643b30fff86ec16c5d25c50337255ba44f930beba614a4600a4bed61e7ca9ecf9c85ddd7555df4e44c2cd77c2aa0ef321575b712f0d66e21a86c9999 WHIRLPOOL 3fe4b6b93b21e78e87a82ca7d564ea01f0fbd9fcd62d23b2615daa981ddfdec2836968050153e51bd9bf2e7717f254f9e622d2659988a10a3f78d47aebc8243c AUX tmpfiles-d-portage.conf 43 SHA256 dc88c8cb76df1ca82861b5b9430785d0c1f5bdec19ed5fc2f0296c75692ce099 SHA512 e329444f9b38df6cd5a3075ee799827438555e7b6fc53bbb820485ec0ad7c5ca8cad00b1679f0baae7dc484bd185955b8a9fcf66527d5bd7a55c443b4999fb42 WHIRLPOOL 84ad446bec2b45b70767b4b57a47ebb609659b30a7e84a704d317a970e62caebc2e275156667be61673fef94b64b3fc43693f320ef3eeb12ef3c62bce2c666d2 AUX update-autoshutdown 94 SHA256 bd42a7125c4cf5cfb013178f9562f21e8827a9879be85f3fd5445b6c50579023 SHA512 8d131120646ff1aef8403c2decb92bb9150aef9d57cb36438a42438f4573a4d52fe390d2644c423a76997fdbcdb94a7b72c1a56ecebc81937a71d7181ac71ddf WHIRLPOOL a11b2e8c0eaaea890f3aa2ecf4efc61b16e53848ffd67c9e502c4b6516c20f257e685b299b880dc0ee449ca72e26f4cf08aea75ca9da6b75c3cc0e74024403d9 AUX update-install2 683 SHA256 632be90dea05414607e7be7be72f4546b831b719deedb2068ad14575bc0ac70e SHA512 64895037bb13f59a255c75f852249ff1d23088e9b4faf7e908f9f112a1ce30ce9efe9fc568836da43cddc3c3f906f6c92c62642fd17bc19b74689632c03403b1 WHIRLPOOL 766182bcb66204078ffe36c5e6d9784493c506dd83481cd7e8bb132c1355ef6fce5e507b63391e18e6b67b0dd0fbd1df05b3be77185276af49c8041a54accf04 AUX update.portage.cron-2 48 SHA256 db1c43c1d9aa7b906e39dd397499a1a33fc36103a1bc06c21eea36156be895a9 SHA512 431d8ed50c2fc6d4b0e9e3550e4ba5d8320595961c6dab14820ae7b5abd39bf63cb6afb99724f2b4aebb2c0cf14b46927d2abecb6d9509db158000b8ea6a97b8 WHIRLPOOL 8cd7b3a90dbaa55f7dacb22f9408a75a121abea37392328f749cf27c3f82ba81379c4de7a1e0db3352de0cfd1697fe89f866eeb002a5c159c481e22e5243b244 -AUX weekly-av-scan.cron 664 SHA256 f87746d7ad3b2bce8ec880b28023d095edc7f9d19d3963f93f306ce937f71533 SHA512 c546533627a2317bb3e0c8ed635b220113e499f90eea0c450a9e6d5b32ffcf24d2bed1dd96161d7ccf4299e7cee4fac3ae69152c2db18b8ce6ef8603e0e031dd WHIRLPOOL b41c635775b7b8e17e41521558a79493ce91597a1399814ef510283c989aab8c8d2681692e3d871796df5066e2305f91b391533fa9513be6323a502682184066 +AUX weekly-av-scan.cron 1215 SHA256 86cfd030137a08d82c3d678196db9b582e93a5ece138ac97939a0efb4a3be3b0 SHA512 3da4781490a1703c0a00884e0a3a053b4a65207a5cb1320418cce02a10fd2c8802d6516cd22080b32d2a36212adbf4b5e471623019997dfddfe6cc1c15bf64a6 WHIRLPOOL 77f02904e7aa53179fedffe849f0dd1a0f9e4b5ac9bd97e5b1b3543da3310d176c19b398ccd261b8d75f6873a1860a6434e2587d5ecd2cf5a904ec32790db5de AUX write-new-updates 409 SHA256 e4c05e38082914bd9d367c69a7d1fe44fb459d8526c9e407f0b73784878640cc SHA512 5f6b852ec563f764617d747c3024a89044e409345b599e5476963573f4ef639fcf67c7eadc0cc12857c7e3c0be59a2b912d1d06a10c647c5af61cefd182ff1a5 WHIRLPOOL a42d0115ad685f28a3da51e2593ee9ae90a4021797655aef7e6083ee59572507f2a105ed32fbc019fe535783b73ce14739478cda9c707840b7c0cca3b667542a -EBUILD miller-base-10.3-r3.ebuild 3402 SHA256 bc98771f8240455f5bf231763f207216c5ef98c4480f412bca064aa950ea97f2 SHA512 aa2170db304027b425ca476e3fc536061242fcfc479e1b0a25315c51e97e924dad0da0a8f35ed1b1803e19d0ee0755a3132fe6bd1612839770229049a75cd254 WHIRLPOOL dc965a548ff2b96d980f75a9e238d722e92ae7f7ab0a3727778d5dc1d3d12a140cdec4e0a9a63b547aed25c04b5ac5774b8354494d7c7a842cc22484a793a0d7 +EBUILD miller-base-10.4.ebuild 3619 SHA256 36aced040ee9d2fc25f69d612f1fd23953393e201d3a31dde74e8a8f61482d76 SHA512 84c9d0493bd9e4998d3ad3ed6d463bae7a5ba2c575304b1a6bb0de9e6e7faa67455812088841226159f812b9a147ee4c5648bad5639a0bc4d483b254526a5d31 WHIRLPOOL d3c0066db4c210ccbfca018eee9dce9f22afec59718698a82bfd97867a0e21896f39ba519f87542221e0e545dba1494820471f8ede7e5ab41bebe8c99d4a7458 diff --git a/virtual/miller-base/files/kernels-cleaner b/virtual/miller-base/files/kernels-cleaner new file mode 100755 index 0000000..bfa7ab4 --- /dev/null +++ b/virtual/miller-base/files/kernels-cleaner @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ $(ls /boot/kernel* | wc -w) -gt 2 ] ; then + echo "Cleaning old kernels..." + eclean-kernel -dn2 + grub-mkconfig -o /boot/grub/grub.cfg +fi + diff --git a/virtual/miller-base/files/newkernel b/virtual/miller-base/files/newkernel new file mode 100755 index 0000000..450abae --- /dev/null +++ b/virtual/miller-base/files/newkernel @@ -0,0 +1,13 @@ +#!/bin/bash + +[ -s "$PORTAGE_TMPDIR" ] && exec -c /bin/bash -l -c $0 + +if [ /usr/src/linux -nt /boot ] ; then + if [ ! -f /usr/src/linux/.config -a -f /proc/config.gz ] ; then + zcat /proc/config.gz > /usr/src/linux/.config + fi + genkernel all && \ + grub-mkconfig -o /boot/grub/grub.cfg + touch /boot +fi + diff --git a/virtual/miller-base/files/systemd-reload b/virtual/miller-base/files/systemd-reload new file mode 100755 index 0000000..7900443 --- /dev/null +++ b/virtual/miller-base/files/systemd-reload @@ -0,0 +1,4 @@ +#!/bin/bash + +systemctl daemon-reload + diff --git a/virtual/miller-base/files/weekly-av-scan.cron b/virtual/miller-base/files/weekly-av-scan.cron index 462e7e3..53b1c9f 100755 --- a/virtual/miller-base/files/weekly-av-scan.cron +++ b/virtual/miller-base/files/weekly-av-scan.cron @@ -1,28 +1,55 @@ #!/bin/bash -EXCL=$( - portageq distdir - portageq pkgdir - portageq get_repo_path / $(portageq get_repos /) -) -ROOTS=$(mount | grep ^/dev/ | sort -u -k1,1 | cut -d ' ' -f 3 | sort) +CLAMD=${CLAMD:-auto} +CLAMDSOCK="${CLAMDSOCK:-/run/clamav/clamd.sock}" -echo "Scanning:" -echo $ROOTS -echo +if [ -f /etc/conf.d/av-scan ] ; then + set -o allexport + . /etc/conf.d/av-scan + set +o allexport +fi + +declare -a EXCL +declare -A M +EXCL=( + $(portageq distdir) + $(portageq pkgdir) + $(portageq get_repo_path / $(portageq get_repos /)) + $(mount | grep -v ^/dev/ | sort -u -k3,3 | cut -d ' ' -f 3 | sort -u) + $(mount | grep ^/dev | while read dev on path type fs opts ; do + devhash=${dev//\//_} + if [ ${M[$devhash]} ] ; then + echo $path + else + M[$devhash]=$path + fi + done) +) echo "Excluding:" -echo $EXCL +echo ${EXCL[@]} echo +EXCLARGS=("${EXCL[@]/#/-x }") -if [ -S /run/clamav/clamd.sock ] ; then +if [ ! -S ${CLAMDSOCK} -a ${CLAMD} = "yes" ] ; then + echo "Starting clamd..." + systemctl start clamd + CLAMD="started" +fi + +if [ -S ${CLAMDSOCK} -a ${CLAMD} != "no" ] ; then echo "Using clamd" - EXCLARGS=$(ls -1d $EXCL | sed -ne 's/\(.*\)/-path \1 -o/p') rm -f /tmp/scan mkfifo /tmp/scan - find $ROOTS -xdev \( $EXCLARGS -empty \) -prune -o -type f -print > /tmp/scan & - clamdscan -i --fdpass -f /tmp/scan + simplifind -r / ${EXCLARGS[@]} > /tmp/scan & + clamdscan -i --fdpass -f /tmp/scan -m -l /var/log/av-scan.log rm -f /tmp/scan else - EXCLARGS=$(ls -1d $EXCL | sed -ne 's/\(.*\)/--exclude-dir="\1"/p') - nice clamscan -ri --cross-fs=no $ROOTS $EXCLARGS + echo "Using clamscan" + simplifind -r / ${EXCLARGS[@]} | xargs nice clamscan -ri -l /var/log/av-scan.log fi + +if [ -S ${CLAMDSOCK} -a ${CLAMD} = "started" ] ; then + echo "Stopping clamd..." + systemctl stop clamd +fi + diff --git a/virtual/miller-base/miller-base-10.3-r3.ebuild b/virtual/miller-base/miller-base-10.4.ebuild index a5fd198..b51e18d 100644 --- a/virtual/miller-base/miller-base-10.3-r3.ebuild +++ b/virtual/miller-base/miller-base-10.4.ebuild @@ -8,6 +8,7 @@ minimal autoupdate autoshutdown autoservicerestart sw-suspend raid video_cards_nvidia firmware ischroot systemd" RDEPEND=" + app-misc/simplify sys-kernel/kergen app-arch/hardlink sys-process/htop @@ -93,6 +94,9 @@ src_install() { newexe "${FILESDIR}"/service-check.openrc service-check fi + exeinto /etc/cron.monthly + use !minimal && newexe "${FILESDIR}"/kernels-cleaner kernels-cleaner + exeinto /etc/cron.weekly use !minimal && newexe "${FILESDIR}"/weekly-av-scan.cron av-scan @@ -114,6 +118,8 @@ src_install() { use !autoupdate && newexe "${FILESDIR}"/auto-download-packages 70-auto-download-package newexe "${FILESDIR}"/auto-update-overlays 10-auto-update-overlays newexe "${FILESDIR}"/write-new-updates 50-write-new-updates + newexe "${FILESDIR}"/newkernel 80-newkernel + newexe "${FILESDIR}"/systemd-reload 90-systemd-reload if use autoupdate ; then dosym /sbin/update-install /etc/portage/postsync.d/75-update-install if use autoshutdown ; then |