diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2010-07-28 14:30:32 -0700 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2010-07-28 14:30:32 -0700 |
commit | 639c835bc2730a4fbffd915f5b2028a68375ee7a (patch) | |
tree | 203d61e1d5e8ef422d6aba3851d2f83a1f838b6b /debian/vyatta-cfg.postinst.in | |
parent | 0247864ef578ac05bbac8dc5175e674ce7b82714 (diff) | |
download | vyatta-cfg-639c835bc2730a4fbffd915f5b2028a68375ee7a.tar.gz vyatta-cfg-639c835bc2730a4fbffd915f5b2028a68375ee7a.zip |
add new cstore library
Diffstat (limited to 'debian/vyatta-cfg.postinst.in')
-rw-r--r-- | debian/vyatta-cfg.postinst.in | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/debian/vyatta-cfg.postinst.in b/debian/vyatta-cfg.postinst.in index 48b889d..c307803 100644 --- a/debian/vyatta-cfg.postinst.in +++ b/debian/vyatta-cfg.postinst.in @@ -1,10 +1,24 @@ #!/bin/bash prefix=@prefix@ +exec_prefix=@exec_prefix@ sysconfdir=@sysconfdir@ +sbindir=@sbindir@ -mkdir -m 0775 -p $sysconfdir/config $prefix/config -chgrp vyattacfg $sysconfdir/config $prefix/config 2>/dev/null +if [ "$1" = "configure" ]; then + ldconfig +fi + +for dir in $sysconfdir/config $prefix/config; do + if [ -d "$dir" ]; then + # already exists + chmod 2775 $dir + else + # create it + mkdir -m 2775 -p $dir + fi + chgrp vyattacfg $dir 2>/dev/null +done update-rc.d vyatta-router defaults 90 >/dev/null @@ -16,3 +30,10 @@ if [ "$sysconfdir" != "/etc" ]; then touch /etc/$conf done fi + +# capability stuff +for bin in my_cli_bin my_cli_shell_api; do + touch -ac $sbindir/$bin + setcap cap_sys_admin=pe $sbindir/$bin +done + |