{"id":84,"date":"2011-12-08T22:34:08","date_gmt":"2011-12-08T18:34:08","guid":{"rendered":"http:\/\/blog.mgvmi-hipl.ru\/?p=84"},"modified":"2011-12-08T22:34:08","modified_gmt":"2011-12-08T18:34:08","slug":"%d0%bf%d1%80%d0%b0%d0%b2%d0%b8%d0%bb%d1%8c%d0%bd%d1%8b%d0%b9-%d0%b8-%d0%ba%d1%80%d0%b0%d1%81%d0%b8%d0%b2%d1%8b%d0%b9-%d1%81%d0%bf%d0%be%d1%81%d0%be%d0%b1-%d0%b4%d0%be%d0%b1%d0%b0%d0%b2%d0%bb%d1%8f","status":"publish","type":"post","link":"https:\/\/blog.5flor.ru\/?p=84","title":{"rendered":"\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0438 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u0438 \u044f\u0434\u0440\u0430 \u0432 \u0430\u0432\u0442\u043e\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0432 CentOS 5.X"},"content":{"rendered":"<p>\u00a0\u041d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 <a href=\"http:\/\/purpleblog.wordpress.com\/2008\/06\/25\/centos-modules-autoload\/\">\u0431\u043b\u043e\u0433<\/a> \u0441 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u043c \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0432 \u0430\u0432\u0442\u043e\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 centos 5.x.<\/p>\n<p>\u0412\u0441\u0435 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0432 \u0441\u0430\u043c\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0438, \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430, \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0430\u0442\u044c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434 =) \u0412 \u0444\u0430\u0439\u043b\u0435 \/etc\/rc.sysinit \u0435\u0441\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f:<\/p>\n<div id=\"content\">\n<div id=\"content-left\">\n<div id=\"post-426\">\n<pre># Load other user-defined modules\r\nfor file in \/etc\/sysconfig\/modules\/*.modules ; do\r\n  [ -x $file ] &amp;&amp; $file\r\ndone<\/pre>\n<p>\u0422.\u0435. \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b some_name.modules \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \/etc\/sysconfig\/modules\/, \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043d\u0430 \u0435\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443. \u0427\u0442\u043e-\u0442\u043e \u0442\u0430\u043a\u043e\u0435:<\/p>\n<pre># cat \/etc\/sysconfig\/modules\/some_name.modules\r\nmodprobe some_module<\/pre>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f\/\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435\/\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0438\u0448\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442:<\/p>\n<pre>#!\/bin\/sh\r\n\r\ncheck_action ()\r\n{\r\n        if [ $ACTION != \"list\" ] &amp;&amp; [ $ACTION != \"add\" ] &amp;&amp; [ $ACTION != \"del\" ]; then\r\n                show_help\r\n                exit 1\r\n        fi\r\n}\r\n\r\nshow_help ()\r\n{\r\n        echo Usage: `basename $0` ACTION [ MODULE_NAME ]\r\n        echo ACTION - list\\|add\\|del\r\n        echo MODULE_NAME - module name for add\\|del ACTION\r\n}\r\n\r\nmake_action ()\r\n{\r\n        case $ACTION in\r\n                \"list\")\r\n                        for i in `find $WORKDIR -type f -name \"*.modules\"`; do\r\n                                module=`echo $i|sed 's\/\\.modules\/\/'`\r\n                                echo `basename $module`\r\n                        done\r\n                ;;\r\n                \"add\")\r\n                        echo \"modprobe $MODULE_NAME\" &gt; $WORKDIR\/$MODULE_NAME.modules\r\n                        chmod 750 $WORKDIR\/$MODULE_NAME.modules\r\n                ;;\r\n                \"del\")\r\n                        rm -f $WORKDIR\/$MODULE_NAME.modules\r\n                ;;\r\n\r\n        esac\r\n}\r\n\r\nACTION=\"$1\"\r\nMODULE_NAME=\"$2\"\r\nWORKDIR=\"\/etc\/sysconfig\/modules\/\"\r\n: ${ACTION:=\"list\"}\r\n\r\ncheck_action\r\nmake_action<\/pre>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0\u041d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u0431\u043b\u043e\u0433 \u0441 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u043c \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0432 \u0430\u0432\u0442\u043e\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 centos 5.x. \u0412\u0441\u0435 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0432 \u0441\u0430\u043c\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0438, \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430, \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0430\u0442\u044c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434 =) \u0412 \u0444\u0430\u0439\u043b\u0435 \/etc\/rc.sysinit \u0435\u0441\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f: # Load other user-defined modules &hellip; <a href=\"https:\/\/blog.5flor.ru\/?p=84\">\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-84","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=\/wp\/v2\/posts\/84"}],"collection":[{"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=84"}],"version-history":[{"count":0,"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=\/wp\/v2\/posts\/84\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=84"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=84"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=84"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}