blob: 237dc997d11f9fd6c1e5a24575f52618e1e06732 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#!/bin/bash -e
prefix=@prefix@
exec_prefix=@exec_prefix@
sysconfdir=@sysconfdir@
sbindir=@sbindir@
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
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
# capability stuff
for bin in my_cli_bin my_cli_shell_api my_commit; do
touch -ac $sbindir/$bin
setcap cap_sys_admin=pe $sbindir/$bin
done
# handle renamed file (not automatically deleted since it was "conffile")
rm -f /etc/bash_completion.d/20vyatta-cfg
|