write/previous
This commit is contained in:
parent
213e4e01f5
commit
4b47ea99bd
1 changed files with 3 additions and 2 deletions
5
cd.sh
5
cd.sh
|
@ -174,7 +174,6 @@ local text=""
|
||||||
text="${text}nameserver ${server}
|
text="${text}nameserver ${server}
|
||||||
"
|
"
|
||||||
done
|
done
|
||||||
cd_cat "${CD_DNS_FILE}"
|
|
||||||
cd_write "${CD_DNS_FILE}" "${text}"
|
cd_write "${CD_DNS_FILE}" "${text}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,7 +191,8 @@ local file
|
||||||
cd_cat "${file}"
|
cd_cat "${file}"
|
||||||
;;
|
;;
|
||||||
"${CD_OS_DEBIAN}")
|
"${CD_OS_DEBIAN}")
|
||||||
cd_write "/etc/apt/sources.list" "\
|
file="/etc/apt/sources.list"
|
||||||
|
cd_write "${file}" "\
|
||||||
deb ${CD_OS_REPO} ${CD_OS_VERSION} main
|
deb ${CD_OS_REPO} ${CD_OS_VERSION} main
|
||||||
deb ${CD_OS_REPO} ${CD_OS_VERSION}-backports main
|
deb ${CD_OS_REPO} ${CD_OS_VERSION}-backports main
|
||||||
deb ${CD_OS_REPO} ${CD_OS_VERSION}-updates main
|
deb ${CD_OS_REPO} ${CD_OS_VERSION}-updates main
|
||||||
|
@ -444,6 +444,7 @@ cd_write () {
|
||||||
local file="${1}"
|
local file="${1}"
|
||||||
local text="${2}"
|
local text="${2}"
|
||||||
if [ "${file}" ] ; then
|
if [ "${file}" ] ; then
|
||||||
|
[ -f "${file}" ] && cd_cat "${file}"
|
||||||
echo "→ ${1}"
|
echo "→ ${1}"
|
||||||
echo -n "${text}" > "${file}" || exit
|
echo -n "${text}" > "${file}" || exit
|
||||||
cd_cat "${file}"
|
cd_cat "${file}"
|
||||||
|
|
Loading…
Reference in a new issue