From: "Konstantin A. Lepikhov" <lakostis@altlinux.ru>
To: ALT Devel discussion list <devel@altlinux.ru>
Subject: [devel] Re: I: new script for lsm loading
Date: Thu, 17 Mar 2005 23:43:50 +0300
Message-ID: <20050317204350.GA22055@lks.home> (raw)
In-Reply-To: <20050316203550.GA2447@lks.home>
[-- Attachment #1.1: Type: text/plain, Size: 992 bytes --]
Hi !
Wednesday 16, at 11:35:50 PM you wrote:
> Hi!
>
> Wednesday 16, at 11:18:48 PM you wrote:
>
> > Hi Dmitry!
> >
> > Wednesday 16, at 10:59:44 PM you wrote:
> >
> > > On Wed, Mar 16, 2005 at 10:55:43PM +0300, Konstantin A. Lepikhov wrote:
> > > > PS Если мантейнер startup не против, могу повесить это в bugzilla.
> > >
> > > А что ещё находится (или предполагается разместить) в каталоге /etc/lsm/?
> > пока кроме файла modules ничего. Возможно, в будущих версиях этого
> > скрипта, появится что-нибудь еще (например, список конфликтных lsm).
> впрочем, можно сделать так - вместо /etc/lsm/modules ->
> /etc/sysconfig/lsm, а все свистульки - в /etc/lsm.d/ (в отдаленном
> будущем).
Прикладываю поправленную версию.
--
WBR, Konstantin chat with ==>ICQ: 109916175
Lepikhov, speak to ==>JID: lakostis@jabber.org
aka L.A. Kostis write to ==>mailto:lakostis@pisem.net.nospam
...The information is like the bank... (c) EC8OR
[-- Attachment #1.2: load_lsm --]
[-- Type: text/plain, Size: 965 bytes --]
#!/bin/sh
#
# /etc/rc.d/scripts/load_lsm - run once at boot time from rc.sysinit
#
[ `kernelversion_minor` -le 6 ] || exit 0
WITHOUT_RC_COMPAT=1
# some defaults
DEFAULT_LSM="capability"
DEFAULT_CFG="/etc/sysconfig/lsm"
# Source function library.
. /etc/init.d/functions
mod_try()
{
local ret=0
/sbin/modinfo "$1" &>/dev/null
ret=$?
echo $ret
}
load_lsm()
{
# Loop over every line in /etc/lsm/modules.
(cat "$DEFAULT_CFG"; echo) | while read module args; do
# Ignore empty lines and comments.
[ -n "${module##\#*}" ] || continue
[ `mod_try $module` -eq 0 ] && \
action "Loading LSM module $module:" /sbin/modprobe "$module" $args 2>/dev/null \
|| continue
done
}
# sanity checks
[ `mod_try $DEFAULT_LSM` -eq 0 ] || { echo "Your kernel don't support LSM loading. Aborting process..."; exit 0; }
[ -f "$DEFAULT_CFG" -a -n "$DEFAULT_CFG" ] && load_lsm || /sbin/modprobe $DEFAULT_LSM 2>/dev/null
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2005-03-17 20:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-16 19:55 [devel] " Konstantin A. Lepikhov
2005-03-16 19:59 ` Dmitry V. Levin
2005-03-16 20:18 ` [devel] " Konstantin A. Lepikhov
2005-03-16 20:35 ` Konstantin A. Lepikhov
2005-03-17 20:43 ` Konstantin A. Lepikhov [this message]
2005-03-16 20:29 ` [devel] " Sergey Vlasov
2005-03-16 20:38 ` [devel] " Konstantin A. Lepikhov
2005-03-17 7:28 ` [devel] " Denis Ovsienko
2005-03-17 7:39 ` [devel] [JT] " Michael Shigorin
2005-03-17 18:43 ` [devel] " Konstantin A. Lepikhov
2005-03-17 20:31 ` [devel] [JT] etcfoo Dmitry V. Levin
2005-03-18 8:16 ` Denis Ovsienko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050317204350.GA22055@lks.home \
--to=lakostis@altlinux.ru \
--cc=devel@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git