Replace suite name with alias in sources.list
This keeps the image at the same major release even in case of later stable releases.
This commit is contained in:
parent
7c5dee0139
commit
d7a45d22af
|
|
@ -34,7 +34,7 @@ install -m 0755 -o root -g root scripts/* $rootfs/$bindir
|
|||
|
||||
for script in $(ls $rootfs/$bindir); do
|
||||
echo "+ /$bindir/$script"
|
||||
chroot $rootfs /$bindir/$script
|
||||
chroot $rootfs /$bindir/$script $suite
|
||||
done
|
||||
|
||||
chroot $rootfs apt-get --purge autoremove -q -y
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh -eu
|
||||
# tweak-apt-sources -- to use alias instead of suite name
|
||||
# Copyright (C) 2017 Olaf Meeuwissen
|
||||
#
|
||||
# License: GPL-3.0+
|
||||
|
||||
DIR=/
|
||||
ETC=etc/apt
|
||||
SOURCES=sources.list
|
||||
|
||||
eval $(apt-config shell DIR Dir)
|
||||
eval $(apt-config shell ETC Dir::Etc)
|
||||
eval $(apt-config shell SOURCES Dir::Etc::sourcelist)
|
||||
|
||||
cfg=$DIR$ETC$SOURCES
|
||||
|
||||
suite=$1
|
||||
alias=$(cat /etc/devuan_version)
|
||||
|
||||
sed -i "s/$suite/$alias/" $cfg
|
||||
|
||||
rm $0
|
||||
Loading…
Reference in New Issue