本文主要是介绍嵌入式文件系统创建工具之---fakeroot,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
fakeroot 可以用来模拟 root 权限,以便建立特定权限与档案拥有者的压缩文件案(tar, ar, .deb 等)。透过 LD_PRELOAD 的 dynamic loader 功能,用户不必实际拥有 root 权限。
生成系统文件时使用
echo "make squash image ..."
echo "${TOOLDIR}/makedevs -d device_table.txt ${CUDIR}/fs" > squash_input
echo "${TOOLDIR}/mksquashfs ${FS_DIR} ${2} -all-root -le -noappend" >> squash_input
echo "exit" >> squash_input
#chmod +x squash_input
#./squash_input
fakeroot<squash_input > /dev/null
rm squash_input
这篇关于嵌入式文件系统创建工具之---fakeroot的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!