From: Michael Tremer <michael.tremer@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: [PATCH v2] Core Update 170: Harden mount options of /boot on existing installations
Date: Thu, 14 Jul 2022 10:34:09 +0100 [thread overview]
Message-ID: <DE49EB57-0E24-455A-91D2-B767B8ED8576@ipfire.org> (raw)
In-Reply-To: <0deb7c1a-60ee-66c2-c92a-333e1325f698@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 1623 bytes --]
Hello,
The pointer: https://git.ipfire.org/?p=ipfire-2.x.git;a=blob;f=src/installer/hw.c;h=12f8e793de49b65afb4d271f10d6d7717e8a8145;hb=HEAD#l1125
-Michael
> On 13 Jul 2022, at 20:48, Peter Müller <peter.mueller(a)ipfire.org> wrote:
>
> Hello *,
>
> additionally, we need to ensure /boot mount options are already written with these flags
> into /etc/fstab on new installations. For flash-images, this is already done in C169, but
> I have yet to investigate where to change things for the ISO files.
>
> Any hints would be appreciated. :-)
>
> Thanks, and best regards,
> Peter Müller
>
>
>> The second version of this patch uses @ instead of / for sed delimiters,
>> which makes the command less hard to read. Since Core Update 170 already
>> requires a reboot at this point, the respective directive is omitted.
>>
>> Signed-off-by: Peter Müller <peter.mueller(a)ipfire.org>
>> ---
>> config/rootfiles/core/170/update.sh | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/config/rootfiles/core/170/update.sh b/config/rootfiles/core/170/update.sh
>> index 7dde03060..78a4709bc 100644
>> --- a/config/rootfiles/core/170/update.sh
>> +++ b/config/rootfiles/core/170/update.sh
>> @@ -110,6 +110,9 @@ chown nobody:nobody /var/lib/ipblocklist
>> # Start services
>> /etc/init.d/rc.d/unbound start
>>
>> +# Harden mount options of /boot
>> +sed -e -i "s@[[:space:]]*\/boot[[:space:]]*auto[[:space:]]*defaults[[:space:]]*@ \/boot auto defaults,nodev,noexec,nosuid @g" /etc/fstab
>> +
>> # This update needs a reboot...
>> touch /var/run/need_reboot
>>
next prev parent reply other threads:[~2022-07-14 9:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-13 19:46 Peter Müller
2022-07-13 19:48 ` Peter Müller
2022-07-14 9:34 ` Michael Tremer [this message]
2022-07-14 10:15 ` Peter Müller
2022-07-14 10:17 ` Michael Tremer
2022-07-14 10:19 ` Peter Müller
2022-07-28 13:29 ` Peter Müller
2022-07-28 19:41 ` Michael Tremer
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=DE49EB57-0E24-455A-91D2-B767B8ED8576@ipfire.org \
--to=michael.tremer@ipfire.org \
--cc=development@lists.ipfire.org \
/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