summaryrefslogtreecommitdiff
path: root/debian/vyatta-cfg.postinst.in
blob: 48b889d673d1efa6634f6e0ab601b2e752f268e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

prefix=@prefix@
sysconfdir=@sysconfdir@

mkdir -m 0775 -p $sysconfdir/config $prefix/config
chgrp vyattacfg $sysconfdir/config $prefix/config 2>/dev/null

update-rc.d vyatta-router defaults 90 >/dev/null

if [ "$sysconfdir" != "/etc" ]; then
  # remove the config files and replace with blank ones
  for conf in dhcp3/dhclient.conf 
  do
    [ -f /etc/$conf ] && mv -f /etc/$conf /etc/$conf.vyatta-save
    touch /etc/$conf
  done
fi