File: pre_distupgrade_allow_unauthenticated

package info (click to toggle)
piuparts 1.6.0
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 72,532 kB
  • sloc: python: 8,240; sh: 4,367; makefile: 171
file content (69 lines) | stat: -rwxr-xr-x 2,252 bytes parent folder | download | duplicates (3)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/sh
set -e

if [ "$PIUPARTS_DISTRIBUTION_NEXT" = "squeeze" ]; then
	rm -fv /etc/apt/apt.conf.d/unauthenticated-lenny
fi

if [ -e /etc/apt/apt.conf.d/unauthenticated-lenny ]; then
	echo "FAIL: /etc/apt/apt.conf.d/unauthenticated-lenny exists"
	exit 1
fi

############################################################################

if [ "$PIUPARTS_DISTRIBUTION_NEXT" = "wheezy" ]; then
	rm -fv /etc/apt/apt.conf.d/unauthenticated-squeeze
fi

if [ "$PIUPARTS_DISTRIBUTION_NEXT" = "squeeze" ]; then
	echo "Creating /etc/apt/apt.conf.d/unauthenticated-squeeze ..."
	# apt/lenny does not like comments ...
	tee /etc/apt/apt.conf.d/unauthenticated-squeeze <<EOF
APT::Get::AllowUnauthenticated "true";
Acquire::Check-Valid-Until "false";
EOF
elif [ "$PIUPARTS_DISTRIBUTION_NEXT" = "squeeze-backports" ]; then
	:
elif [ "$PIUPARTS_DISTRIBUTION_NEXT" = "squeeze-lts" ]; then
	:
elif [ -e /etc/apt/apt.conf.d/unauthenticated-squeeze ]; then
	echo "FAIL: /etc/apt/apt.conf.d/unauthenticated-squeeze exists"
	exit 1
fi

############################################################################

if [ "$PIUPARTS_DISTRIBUTION_NEXT" = "jessie" ]; then
	rm -fv /etc/apt/apt.conf.d/unauthenticated-wheezy
fi

if [ "$PIUPARTS_DISTRIBUTION_NEXT" = "wheezy" ]; then
	echo "Creating /etc/apt/apt.conf.d/unauthenticated-wheezy ..."
	tee /etc/apt/apt.conf.d/unauthenticated-wheezy <<EOF
# The Release file is not getting updated.
Acquire::Check-Valid-Until "false";
EOF
elif [ "$PIUPARTS_DISTRIBUTION_NEXT" = "wheezy-backports" ]; then
	:
elif [ -e /etc/apt/apt.conf.d/unauthenticated-wheezy ]; then
	echo "FAIL: /etc/apt/apt.conf.d/unauthenticated-wheezy exists"
	exit 1
fi

############################################################################

if [ "$PIUPARTS_DISTRIBUTION_NEXT" = "stretch" ]; then
	rm -fv /etc/apt/apt.conf.d/unauthenticated-jessie
fi

if [ "$PIUPARTS_DISTRIBUTION_NEXT" = "jessie-backports" ]; then
	echo "Creating /etc/apt/apt.conf.d/unauthenticated-jessie ..."
	tee /etc/apt/apt.conf.d/unauthenticated-jessie <<EOF
# The Release file is not getting updated.
Acquire::Check-Valid-Until "false";
EOF
elif [ -e /etc/apt/apt.conf.d/unauthenticated-jessie ]; then
	echo "FAIL: /etc/apt/apt.conf.d/unauthenticated-jessie exists"
	exit 1
fi