详解Linuxrc、rcS、rc.local、Profile
来源:互联网 发布:淘宝宝贝数据采集器 编辑:程序博客网 时间:2024/05/17 22:16
本文转载自:http://www.cnblogs.com/king-77024128/articles/2275545.html
/Linuxrc 执行init 进程初始化文件。主要工作是把已安装根文件系统中的/etc 安装为ramfs,并拷贝/mnt/etc/目录下所有文件到/etc,这里存放系统启动后的许多特殊文件;接着Linuxrc 重新构建文件分配表inittab;之后执行系统初始化进程/sbin/init。
/mnt/etc/init.d/rcS 完成各个文件系统的 mount,再执行/usr/etc/rc.local;通过rcS 可以调用 dhcp 程序配置网络。rcS 执行完了以后,init 就会在一个 console 上,按照 inittab 的指示开一个 shell,或者是开 getty + login,这样用户就会看到提示输入用户名的提示符。
/usr/etc/rc.local 这是被init.d/rcS 文件调用执行的特殊文件,与Linux 系统硬件平台相关,如安装核心模块、进行网络配置、运行应用程序、启动图形界面等。
/usr/etc/profile rc.local 首先执行该文件配置应用程序需要的环境变量等。
Linuxrc
#!/bin/sh
echo "mount /etc as ramfs"
/bin/mount -n -t ramfs ramfs /etc
/bin/cp -a /mnt/etc/* /etc
echo "re-create the /etc/mtab entries"
# re-create the /etc/mtab entries
/bin/mount -f -t cramfs -o remount,ro /dev/mtdblock/3 /
/bin/mount -f -t ramfs ramfs /etc
exec /sbin/init
rcS
/mnt/etc/init.d/
#!/bin/sh
/bin/mount -a
exec /usr/etc/rc.local
rc.local
/usr/etc/
#!/bin/sh
. /usr/etc/profile
echo "HELLO! Embest"
echo "ifconfig eth0 192.168.0.10"
ifconfig eth0 192.168.0.10 可自行配置开发板IP
Profile
/usr/etc/
#!/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin 设置命令工具所在位置
我对这其中的执行顺序理解:
我在我的开发板中的(位置)/etc/init.d/rcS 文件中添加了关于对QT应用程序的执行设置需要的库函数的路径做export声明,鉴于对上述执行顺序的理解,我感觉对在rcS文件中添加并自动运行的应用程序,必须要指明所需支持库的路径。若在(位置)/etc/profile文件中添加对应用程序库的路径声明是不行的,因为rcS文件中程序的要比/etc/profile中的程序先执行。所以,想想吧……
- 详解Linuxrc、rcS、rc.local、Profile
- 详解Linuxrc、rcS、rc.local、Profile
- 详解Linuxrc、rcS、rc.local、Profile
- 详解Linuxrc、rcS、rc.local、Profile
- 详解Linuxrc、rcS、rc.local、Profile
- linuxrc文件,rc.local文件,rcS文件,我的根文件系统启动脚本文件
- profile,rc.local执行顺序
- /etc/rc.local 与 /etc/profile
- /etc/profile 和 /etc/rc.d/rc.local启动顺序
- linuxrc 详解
- linuxrc详解
- linuxrc 详解
- linux rc.local profile.d/file 执行区别
- /etc/rc.d/rc.local 与 /etc/profile .bash_profile .bashrc 文件执行顺序
- 启动文件rc.local、/etc/bash.bashrc、~/bashrc、/etc/profile、~/.profile【转载from joyride】值得了解
- Linux 配置文件 启动文件rc.local、/etc/bash.bashrc、~/bashrc、/etc/profile、~/.profile加载顺序
- 启动文件rc.local、/etc/bash.bashrc、~/bashrc、/etc/profile、~/.profile【转载from joyride】值得了解
- 启动文件rc.local、/etc/bash.bashrc、~/bashrc、/etc/profile、~/.profile【转载from joyride】值得
- Tornado AsyncHTTPTestCase gotchas
- 生成树计数 spoj 104 highways
- 策略模式+简单工厂+反射
- java.util.concurrent.CyclicBarrier
- vi eclipse插件 viPlugin的安装和破解方法
- 详解Linuxrc、rcS、rc.local、Profile
- Linux的/etc/services文件的作用?
- 10766 Organising the Organisation
- 对任意字符串全排列
- -1.#ind
- 编程之美系列之求子数组的连续最大和
- ural 1627
- HTML应用 菜谱
- YOUYOU深入学习Ganglia之一(建立Grid)