如何用execline编写Linux脚本

开发者在线 Builder.com.cn 更新时间:2007-01-19作者:builder.com.cn 来源:

#!/bin/execlineb
 
/bin/export PATH "/sbin:/bin:/usr/sbin:/usr/bin"
 
# run the traditional startup services
/bin/foreground { /sbin/rc 1 }
 
# create the stopit and reboot files for runit and chmod them appropriately 
/bin/foreground { /bin/touch /etc/runit/stopit }
/bin/foreground { /bin/touch /etc/runit/reboot }
 
/bin/foreground { /bin/chmod 0 /etc/runit/stopit }
/bin/foreground { /bin/chmod 0 /etc/runit/reboot }
 
# remove /sbin/runit.old if it's found; that indicates runit was upgraded
/bin/foreground { /bin/if { /usr/bin/test -f /sbin/runit.old } /bin/rm -f /sbin/runit.old }
 
/bin/foreground { /bin/echo }

用户评论

  • 用户名
  • 评论内容