pax_global_header00006660000000000000000000000064112351066030014507gustar00rootroot0000000000000052 comment=e34c9899e44f5ba1ccbd0c589e949972af2c167b installer-feature-shm-defaults-stage3-0.1/000075500000000000000000000000001123510660300205515ustar00rootroot00000000000000installer-feature-shm-defaults-stage3-0.1/.gear/000075500000000000000000000000001123510660300215455ustar00rootroot00000000000000installer-feature-shm-defaults-stage3-0.1/.gear/rules000064400000000000000000000000071123510660300226170ustar00rootroot00000000000000tar: . installer-feature-shm-defaults-stage3-0.1/.gear/tags/000075500000000000000000000000001123510660300225035ustar00rootroot00000000000000installer-feature-shm-defaults-stage3-0.1/.gear/tags/list000064400000000000000000000000001123510660300233670ustar00rootroot00000000000000installer-feature-shm-defaults-stage3-0.1/90-set-shm-limits.sh000075500000000000000000000015501123510660300242160ustar00rootroot00000000000000#!/bin/sh -efu a= . install2-init-functions sysctl_conf_file="$destdir/etc/sysctl.conf" sed -i '/^kernel\.shm\(max\|all\|mni\)/d' "$sysctl_conf_file" ||: # sysctl/kernel.txt says "Shared memory segments up to 1Gb are now supported # in the kernel." (bytes) shmmax="$(( 1*1024*1024*1024 ))" # Page size pagesize="$(getconf PAGESIZE)" # Physical memory available totalmem="$(sed -n 's,^MemTotal:[[:space:]]*\([0-9]\+\)[[:space:]]*kB$,\1,p' < /proc/meminfo)" # Set shared memory limit to RAM/2 but not less than default 8GB (pages) [ "$(( $totalmem/2 ))" -gt "$(( 8*1024*1024 ))" ] && shmall="$(( $totalmem/2*1024/$pagesize ))" || shmall="$(( 8*1024*1024*1024/$pagesize ))" # Maximum number of shared memory segments system-wide (default value) shmmni="4096" cat <>"$sysctl_conf_file" kernel.shmmax = $shmmax kernel.shmall = $shmall kernel.shmmni = $shmmni EOF installer-feature-shm-defaults-stage3-0.1/installer-feature-shm-defaults-stage3.spec000064400000000000000000000012401123510660300306260ustar00rootroot00000000000000# vim: set ft=spec: -*- rpm-spec -*- Name: installer-feature-shm-defaults-stage3 Version: 0.1 Release: alt1 Summary: Setup sane shared memory defaults Group: System/Configuration/Other License: GPL Url: http://www.altlinux.org/Installer/beans BuildArch: noarch Source: %name-%version.tar %description This package contains installer stage3 hook to setup sane shared memory defaults suitable for database server. %prep %setup %install %define hookdir %_datadir/install2/postinstall.d mkdir -p %buildroot%hookdir install -pm755 *.sh %buildroot%hookdir/ %files %hookdir/* %changelog * Sat Aug 01 2009 Alexey I. Froloff 0.1-alt1 - Initial build