openSUSE 12.1启动没有(不能)运行after.local的问题
2012-09-06 13:53
417 查看
在openSUSE 12.1中,默认的/etc/init.d/after.local不执行,先介绍下after.local
在openSUSE中没有redhat,centos系的rc.local,作为代替的有boot.local,before.local和after.local,这3个文件都在/etc/init.d/目录下
boot.local
系统中运行rc启动脚本之前会执行这个文件,所以这个文件执行时候系统的网络是没有的
befor.local
该文件在也是在rc启动脚本之前执行,但是会在boot.local之后执行。
after.local
该文件在rc启动脚本之后执行。类似redhat,centos系的rc.local
但是我安装了openSUSE之后,需要开机自动启动一些脚本,但是after.local就是不会执行,问google之后,只有一个老外说了此问题,下面是解决方法:
我们需要创建一个after-local.server的文件在/lib/systemd/system目录中,可以在openSUSE的KDE桌面下按快捷键Alt + F2,然后输入下面命令很回车
把下面内容复制到文件中并保存:
我们需要把after-local.service加入到systemd中。打开你的终端(Termial),执行下面命令:
最后我们编辑/etc/init.d/after.local加入你的启动脚本即可,继续Alt+F2执行下面命令
原文地址:http://www.zzphp.net/?p=197
在openSUSE中没有redhat,centos系的rc.local,作为代替的有boot.local,before.local和after.local,这3个文件都在/etc/init.d/目录下
boot.local
系统中运行rc启动脚本之前会执行这个文件,所以这个文件执行时候系统的网络是没有的
befor.local
该文件在也是在rc启动脚本之前执行,但是会在boot.local之后执行。
after.local
该文件在rc启动脚本之后执行。类似redhat,centos系的rc.local
但是我安装了openSUSE之后,需要开机自动启动一些脚本,但是after.local就是不会执行,问google之后,只有一个老外说了此问题,下面是解决方法:
我们需要创建一个after-local.server的文件在/lib/systemd/system目录中,可以在openSUSE的KDE桌面下按快捷键Alt + F2,然后输入下面命令很回车
kdesu kwrite /lib/systemd/system/after-local.service
把下面内容复制到文件中并保存:
# This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version.[Unit] Description=/etc/init.d/after.local Compatibility ConditionFileIsExecutable=/etc/init.d/after.local [Service] Type=oneshot ExecStart=/etc/init.d/after.local TimeoutSec=0 StandardOutput=tty RemainAfterExit=yes SysVStartPriority=99 [Install] WantedBy=multi-user.target
我们需要把after-local.service加入到systemd中。打开你的终端(Termial),执行下面命令:
sudo systemctl enable /lib/systemd/system/after-local.service
最后我们编辑/etc/init.d/after.local加入你的启动脚本即可,继续Alt+F2执行下面命令
kdesu kwrite /etc/init.d/after.local
原文地址:http://www.zzphp.net/?p=197
相关文章推荐
- 关于suse配置开机启动程序不能运行的问题after.local
- Storyboard中拖拽控件不能运行的问题(在运行的时候,相应的控件代码没有被执行)
- 在Windows Server2008中运行MOSS不能启动Excel Service的问题
- 解决 Ubuntu 下 AcroRead 不能启动的问题(没有任何提示)
- VS.net2005写的程序如何在没有.Net FrameWork的机器上运行 --解决“由于应用程序的配置不正确,应用程序未能启动,重新安装应用程序可能会纠正这个问题”(转载)
- 解决win7没有找到suite objects.dll 因此rational rose不能能启动 运行Rose 提示错误
- 如运行程序提示:“没有找到libmysql.dll,因此这个应用程序未能启动。重新安装应用程序可能会修复此问题。
- 修复快速启动不能显示或没有「显示桌面」项的问题
- Netbeans不能正常启动glassfish或者部署失败不能运行的问题
- Linux下tomcat作为守护进程运行(开机启动、以指定的用户运行、解决非root身份不能绑定1024以下端口的问题)的配置方法
- Win7如何提升为管理员权限,如何开机启动需要管理员权限的程序,解决win7开机不能自动运行的问题等
- Win7如何提升为管理员权限,如何开机启动需要管理员权限的程序,解决win7开机不能自动运行的问题等
- linux:/etc/rc.local 不能自动启动问题
- Win7如何提升为管理员权限,如何开机启动需要管理员权限的程序,解决win7开机不能自动运行的问题等
- CentOS 6下rc.local中的命令在启动后不能自动执行问题的排查方法
- Mac jar包不能运行的问题,未启动Java JAR 文件 “”,检查“控制台”以查找可能的错误的信息
- eclipse启动调试时不能从自己设置的断点处开始运行的问题
- 解决win7没有找到suite objects.dll 导致rational rose不能启动的问题
- 常见问题:试图运行项目时出错:无法启动调试 没有正确安装调试器。请运行安装程序安装或修复调试器
- 解决VS2005编译的MFC在没有安装VS2005的机器上不能运行的问题