apt-setup: rollback and actually run the right script
This commit is contained in:
parent
c3aeccf573
commit
c6b9260780
2 changed files with 15 additions and 4 deletions
|
|
@ -1,7 +1,18 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
. /usr/share/debconf/confmodule
|
||||
|
||||
LEGACY="/target/etc/apt/sources.list"
|
||||
MSG="# Trisquel sources have moved to /etc/apt/sources.list.d/trisquel.sources"
|
||||
file="$1"
|
||||
ROOT="${ROOT:-/target}"
|
||||
LEGACY="$ROOT/etc/apt/sources.list"
|
||||
SD="$ROOT/etc/apt/sources.list.d"
|
||||
SAVETO="$ROOT/etc/apt/sources.list.new"
|
||||
|
||||
printf '%s\n' "$MSG" > "$LEGACY"
|
||||
# If .sources exist, leave sources.list reduced only as a breadcrumb
|
||||
if ls "$SD"/*.sources >/dev/null 2>&1; then
|
||||
MSG="# Trisquel sources have moved to /etc/apt/sources.list.d/trisquel.sources"
|
||||
: > "$SAVETO"
|
||||
printf '%s\n' "$MSG" > "$file" # lo que verify appenderá
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue