Dan*_*ins 3 linux shell debian gnu
我目前正在为内部程序开发Debian软件包.作为此包的一部分,我需要创建程序的大部分功能运行的用户.我在postinst脚本中这样做.postinst脚本可以运行多次(例如,在升级时),因此确保每次都不会尝试创建用户非常重要.
那么,如何确保仅在第一次运行脚本时创建用户,而不会在以后运行脚本时影响用户?
Aid*_*ell 9
尝试:
[aiden@dev ~]$ id aiden uid=500(aiden) gid=500(aiden) groups=500(aiden) [aiden@dev ~]$ id foomonkey id: foomonkey: No such user [aiden@dev ~]$
第一个$?是0,第二个是1.
$?
归档时间:
16 年,10 月 前
查看次数:
137 次
最近记录: