如题.
在以前版本里有一个rcS-sulogin在里面改后就可以运行了,可是10.04版本找不到此文件,所以在.bash-profile里加入的命令行是无法运行的,那么在10.04版本里怎么能让在恢复模式下也运行呢?
ubuntu 10.04如何在恢复模式下自动运行.bash_profile
-
- 帖子: 6
- 注册时间: 2010-06-23 14:31
- 联系:
ubuntu 10.04如何在恢复模式下自动运行.bash_profile
上次由 yuyinyuyin664 在 2010-06-23 18:28,总共编辑 1 次。
- leeaman
- 帖子: 30702
- 注册时间: 2007-02-02 18:14
- 系统: debian sid
-
- 帖子: 6
- 注册时间: 2010-06-23 14:31
- 联系:
Re: ubuntu 10.04恢复模式下自动运行.bash_profile
我是改的root目录的呀!以前用的早期版本也是在那改的!但是也需要改一个叫rcS_sulogin的文件!
如下
Type “pico /etc/event.d/rcS‐sulogin” to start editing the file
6. Edit line 15 (press “Ctrl‐C” to get the current line number that the cursor resides on) and
change “/sbin/sulogin” to “/sbin/sulogin –p
如下
Type “pico /etc/event.d/rcS‐sulogin” to start editing the file
6. Edit line 15 (press “Ctrl‐C” to get the current line number that the cursor resides on) and
change “/sbin/sulogin” to “/sbin/sulogin –p
-
- 帖子: 6
- 注册时间: 2010-06-23 14:31
- 联系:
- task
- 帖子: 133
- 注册时间: 2010-03-02 22:10
Re: ubuntu 10.04如何在恢复模式下自动运行.bash_profile
只能手动载入
cd /home/<username>
source .bash_profile
cd /home/<username>
source .bash_profile
-
- 帖子: 6
- 注册时间: 2010-06-23 14:31
- 联系:
Re: ubuntu 10.04如何在恢复模式下自动运行.bash_profile
可是以前版本的都是可以的呀!在恢复模式!
在老版本里有/etc/event.d/rcS‐sulogin
但是在10.04版本没有这个目录了和文件了,那么10.04中对恢复模式的环境配置又是在哪呢?
还有其他办法可以在恢复模式自动运行脚本吗?
比如我在root目录建一个autoexec.sh,怎样在进入恢复模式就运行这个脚本。
在老版本里有/etc/event.d/rcS‐sulogin
但是在10.04版本没有这个目录了和文件了,那么10.04中对恢复模式的环境配置又是在哪呢?
还有其他办法可以在恢复模式自动运行脚本吗?
比如我在root目录建一个autoexec.sh,怎样在进入恢复模式就运行这个脚本。
-
- 帖子: 6
- 注册时间: 2010-06-23 14:31
- 联系:
Re: ubuntu 10.04如何在恢复模式下自动运行.bash_profile
已经解决,原来我在单用户模式下是non-login登陆的,把脚本加到.bashrc里就OK,加..bash_profile里是不行的。