diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-10-10 00:22:01 +0200 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-10-10 00:22:01 +0200 |
commit | dc93eee654d98bbcfcf3458eec066de27ec685d1 (patch) | |
tree | 26ce57b14dde08f7fbffcbeb5c796c5e7a681e9b | |
parent | 81c94e24cb94b352a9346b6eb03f1e4fcd123f98 (diff) | |
download | vyatta-cfg-dc93eee654d98bbcfcf3458eec066de27ec685d1.tar.gz vyatta-cfg-dc93eee654d98bbcfcf3458eec066de27ec685d1.zip |
Fix permissions of config file during upgrade
Make vyattacfg group before it is used
Older versions had incorrect permissions.
-rw-r--r-- | debian/vyatta-cfg.postinst.in | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/debian/vyatta-cfg.postinst.in b/debian/vyatta-cfg.postinst.in index d934b84..96d66be 100644 --- a/debian/vyatta-cfg.postinst.in +++ b/debian/vyatta-cfg.postinst.in @@ -3,9 +3,19 @@ prefix=@prefix@ sysconfdir=@sysconfdir@ +# add group for configuration, if not already present: +grep '^vyattacfg:' /etc/group >&/dev/null || +addgroup --system vyattacfg + mkdir -m 0775 -p $sysconfdir/config $prefix/config chgrp vyattacfg $sysconfdir/config $prefix/config 2>/dev/null +# fix permissions of config file during upgrade +if [ ! -d $sysconfdir/config/config.boot ]; then + chgrp vyattacfg + chmod 0664 $sysconfdir/config/config.boot +fi + update-rc.d vyatta-ofr defaults 90 >/dev/null # do we want to start vyatta-ofr here in postinst? @@ -18,6 +28,3 @@ if [ "$sysconfdir" != "/etc" ]; then done fi -# add group for configuration, if not already present: -grep '^vyattacfg:' /etc/group >&/dev/null || -addgroup --system vyattacfg |