From 8ca348a924a2c02487dc34ca16376d29ded5029d Mon Sep 17 00:00:00 2001 From: Valentin Vidic Date: Wed, 26 Aug 2009 13:34:51 +0200 Subject: [PATCH] Don't overwrite user modified issue files. --- files/etc/issue.expect.lenny | 2 ++ files/etc/issue.net.expect.lenny | 1 + src/functions.sh | 11 +++++++++-- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 files/etc/issue.expect.lenny create mode 100644 files/etc/issue.net.expect.lenny diff --git a/files/etc/issue.expect.lenny b/files/etc/issue.expect.lenny new file mode 100644 index 0000000..b797604 --- /dev/null +++ b/files/etc/issue.expect.lenny @@ -0,0 +1,2 @@ +Debian GNU/Linux 5.0 \n \l + diff --git a/files/etc/issue.net.expect.lenny b/files/etc/issue.net.expect.lenny new file mode 100644 index 0000000..ac469c2 --- /dev/null +++ b/files/etc/issue.net.expect.lenny @@ -0,0 +1 @@ +Debian GNU/Linux 5.0 diff --git a/src/functions.sh b/src/functions.sh index 5ec3d81..9040822 100644 --- a/src/functions.sh +++ b/src/functions.sh @@ -1240,15 +1240,22 @@ comment_force_overwrite () { fi } +# try not to overwrite user modified issue files fix_issue () { - cat > /etc/issue </dev/null; then + cp -av /etc/issue /etc/issue.$backup_ext + cat > /etc/issue < /etc/issue.net </dev/null; then + cp -av /etc/issue.net /etc/issue.net.$backup_ext + cat > /etc/issue.net <