From: "Konstantin A. Lepikhov" <lakostis@altlinux.ru> To: ALT Linux Devel Mailing List <devel@altlinux.ru> Subject: [devel] I: new script for lsm loading Date: Wed, 16 Mar 2005 22:55:43 +0300 Message-ID: <20050316195543.GA32318@lks.home> (raw) [-- Attachment #1.1: Type: text/plain, Size: 989 bytes --] Hi! Вот что-то такое должно быть. Как мимимум. Что из того, что может не работать: - не проверяется конфликтность lsm между собой (т.е. если написать в /etc/lsm/modules и realtime и trustees и/или capability, что-то одно не загрузится). Впрочем, это сложно проверить, а тому, кто знает, это не надо. Что работает: - все подгружаемые модули хранятся в файле /etc/lsm/modules, в виде списка, идентичного /etc/modules - можно указывать опции для загрузки lsm a la /etc/modules типа <module> [param], где [param] - необязательный параметр. - по-умолчанию, если /etc/lsm/modules не существует, грузится "умолчательный" lsm - это capability. PS Если мантейнер startup не против, могу повесить это в bugzilla. -- 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: 914 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" # 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 /etc/lsm/modules; 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 /etc/lsm/modules ] && load_lsm || /sbin/modprobe $DEFAULT_LSM 2>/dev/null [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next reply other threads:[~2005-03-16 19:55 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-03-16 19:55 Konstantin A. Lepikhov [this message] 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 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=20050316195543.GA32318@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