From: Roland Hieber <rohieb@rohieb.name>
To: ptxdist@pengutronix.de
Cc: Roland Hieber <rohieb@rohieb.name>
Subject: [ptxdist] [PATCH 2/2] rootfs: correctly escape /etc/issue figlets
Date: Fri, 1 Dec 2017 00:31:30 +0100 [thread overview]
Message-ID: <20171130233130.16278-3-rohieb@rohieb.name> (raw)
In-Reply-To: <20171130233130.16278-1-rohieb@rohieb.name>
Use install_replace_figlet's newly introduced 'getty' escape mode to
escape '\' with '\\' and prevent any possible variable interpolation
when /etc/issue is displayed by getty.
Signed-off-by: Roland Hieber <rohieb@rohieb.name>
---
rules/rootfs.make | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/rules/rootfs.make b/rules/rootfs.make
index 81d4cd93a..ef5bba7df 100644
--- a/rules/rootfs.make
+++ b/rules/rootfs.make
@@ -194,10 +194,12 @@ ifdef PTXCONF_ROOTFS_ISSUE
$(call remove_quotes,$(PTXCONF_ROOTFS_ETC_HOSTNAME)))
@$(call install_replace_figlet, rootfs, /etc/issue, \
@FIGLET:VENDOR@, \
- `sed -r 's/ ?([\.:;,]) ?/ \1 /' <<< $(PTXCONF_PROJECT_VENDOR)`)
+ `sed -r 's/ ?([\.:;,]) ?/ \1 /' <<< $(PTXCONF_PROJECT_VENDOR)`, \
+ etcissue)
@$(call install_replace_figlet, rootfs, /etc/issue, \
@FIGLET:HOSTNAME@, \
- `sed -r 's/ ?([\.:;,]) ?/ \1 /' <<< $(PTXCONF_ROOTFS_ETC_HOSTNAME)`)
+ `sed -r 's/ ?([\.:;,]) ?/ \1 /' <<< $(PTXCONF_ROOTFS_ETC_HOSTNAME)`, \
+ etcissue)
endif
ifdef PTXCONF_ROOTFS_HOSTS
--
2.15.0
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
prev parent reply other threads:[~2017-11-30 23:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-30 23:31 [ptxdist] [PATCH 0/2] improve type design in the login banner Roland Hieber
2017-11-30 23:31 ` [ptxdist] [PATCH 1/2] install_replace_figlet: allow escaping the figlet output Roland Hieber
2017-11-30 23:31 ` Roland Hieber [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171130233130.16278-3-rohieb@rohieb.name \
--to=rohieb@rohieb.name \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox