File: cdebconf.preinst

package info (click to toggle)
cdebconf 0.227
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,552 kB
  • sloc: ansic: 16,568; sh: 549; makefile: 456; sql: 52; perl: 13
file content (36 lines) | stat: -rw-r--r-- 925 bytes parent folder | download | duplicates (5)
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
#!/bin/sh
set -e

debconfdir="/var/cache/debconf"
cdebconfdir="/var/lib/cdebconf"

if [ ! -d $cdebconfdir ]; then
 mkdir -p $cdebconfdir
fi

if [ -f $debconfdir/templates.dat -a ! -f $cdebconfdir/templates.dat ]; then

 cp $debconfdir/templates.dat $debconfdir/templates.dat.old
 mv $debconfdir/templates.dat $cdebconfdir/templates.dat
 ln -s $cdebconfdir/templates.dat $debconfdir/templates.dat

fi

if [ -f $debconfdir/config.dat -a ! -f $cdebconfdir/questions.dat ]; then

 cp $debconfdir/config.dat    $debconfdir/config.dat.old
 mv $debconfdir/config.dat    $cdebconfdir/questions.dat
 ln -s $cdebconfdir/questions.dat $debconfdir/config.dat

fi

if [ -f $debconfdir/passwords.dat -a ! -f $cdebconfdir/passwords.dat ]; then

 cp $debconfdir/passwords.dat $debconfdir/passwords.dat.old
 mv $debconfdir/passwords.dat $cdebconfdir/passwords.dat
 ln -s $cdebconfdir/passwords.dat $debconfdir/passwords.dat

fi

#DEBHELPER#