From: Leonid Krivoshein <klark.devel@gmail.com> To: make-initrd@lists.altlinux.org Subject: Re: [make-initrd] Release make-initrd 2.14.0 Date: Thu, 1 Apr 2021 02:49:05 +0300 Message-ID: <e4c03eb1-6b9b-889b-e8b7-cdea8c7490ca@gmail.com> (raw) In-Reply-To: <20210331165523.lm27dw6bxnsaux3d@example.org> [-- Attachment #1: Type: text/plain, Size: 1031 bytes --] 31.03.2021 19:55, Alexey Gladkov пишет: > On Wed, Mar 31, 2021 at 07:20:58PM +0300, Leonid Krivoshein wrote: > [...] >> А что вообще думаешь об аналогии всяких rootonly=, roottype=, rootro=, итп >> для waitdev? > А какой у этого юскейс ? > > waitdev только ожидает появления устройства. Оно не монтируется. Для > mountfs наверно в этом есть смысл. > >> Ведь сейчас waitdev позволяет указать только само устройство, >> подобно root=, но указать дополнительные параметры не получится. В качестве "пробы пера" и консультации (пока не проверял) прикладываю первый патч. Собственно, вопрос в том, можно ли так делать и будет ли это работать? -- Best regards, Leonid Krivoshein. [-- Attachment #2: mountfs.patch --] [-- Type: text/x-patch, Size: 2313 bytes --] commit 2c91f793bde657bb0bbd57b14a49cc5e1728dd19 Author: Leonid Krivoshein <klark@altlinux.org> Date: Thu Apr 1 02:45:23 2021 +0300 pipeline/mountfs: add MOUNTFSOPTS= and MOUNTFSTYPE= parameters diff --git a/features/pipeline/README.md b/features/pipeline/README.md index c573163..fa3f9e3 100644 --- a/features/pipeline/README.md +++ b/features/pipeline/README.md @@ -16,11 +16,16 @@ the previous elements. - `pipeline=name[,name1][,name2]` - the main parameter that determines the order in which pipe elements are called. - `getimage` specifies an URL to fetch and mount. -- `mountfs` specifies a file to mount. -- `overlayfs` defines a list of elements to be combined. - `waitdev` describes the local device to wait. The format of this parameter is the same as `root=`. +## Optional additional parameters + +- `mountfs` specifies a file to mount. +- `mountfstype` specifies a filesystem type. +- `mountfsopts` specifies a mount options. +- `overlayfs` defines a list of elements to be combined. + The separator between the elements is a comma (`,`). The parameters can be specified more than once depending on how many times diff --git a/features/pipeline/data/etc/initrd/cmdline.d/pipeline b/features/pipeline/data/etc/initrd/cmdline.d/pipeline index 4200d57..eb4854e 100644 --- a/features/pipeline/data/etc/initrd/cmdline.d/pipeline +++ b/features/pipeline/data/etc/initrd/cmdline.d/pipeline @@ -3,3 +3,5 @@ register_array string GETIMAGE register_array string MOUNTFS register_array string OVERLAYFS register_array string WAITDEV +register_array string MOUNTFSOPTS +register_array string MOUNTFSTYPE diff --git a/features/pipeline/data/lib/pipeline/mountfs b/features/pipeline/data/lib/pipeline/mountfs index 138afa5..6833455 100755 --- a/features/pipeline/data/lib/pipeline/mountfs +++ b/features/pipeline/data/lib/pipeline/mountfs @@ -9,8 +9,10 @@ target="$(resolve_target "$param")" [ -n "$target" ] || fatal "unable to resolve: $param" -opts= -[ ! -c "$target" ] && [ ! -b "$target" ] || +fstype="$(get_parameter MOUNTFSTYPE)" + +opts="$(get_parameter MOUNTFSOPTS)" +[ ! -c "$target" ] && [ ! -b "$target" ] || [ -n "$opts" ] || opts='ro,loop' -run mount ${opts:+-o $opts} "$target" "$destdir" +run mount ${fstype:+-t $fstype} ${opts:+-o $opts} -- "$target" "$destdir"
next prev parent reply other threads:[~2021-03-31 23:49 UTC|newest] Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-30 18:21 Alexey Gladkov 2021-03-30 20:18 ` Leonid Krivoshein 2021-03-31 7:44 ` Alexey Gladkov 2021-03-31 13:08 ` Leonid Krivoshein 2021-03-31 13:39 ` Alexey Gladkov 2021-03-31 13:55 ` Leonid Krivoshein 2021-03-31 14:07 ` Антон Мидюков 2021-03-31 14:34 ` Alexey Gladkov 2021-03-31 14:40 ` Alexey Gladkov 2021-03-31 14:48 ` Alexey Gladkov 2021-03-31 14:49 ` Leonid Krivoshein 2021-03-31 14:50 ` Антон Мидюков 2021-03-31 15:22 ` Alexey Gladkov 2021-03-31 15:37 ` Антон Мидюков 2021-03-31 15:54 ` Leonid Krivoshein 2021-03-31 15:57 ` Alexey Gladkov 2021-03-31 16:20 ` Leonid Krivoshein 2021-03-31 16:55 ` Alexey Gladkov 2021-03-31 17:02 ` Антон Мидюков 2021-03-31 17:17 ` Alexey Gladkov 2021-03-31 18:08 ` Leonid Krivoshein 2021-03-31 18:10 ` Leonid Krivoshein 2021-03-31 18:29 ` Alexey Gladkov 2021-03-31 18:54 ` Leonid Krivoshein 2021-03-31 18:03 ` Leonid Krivoshein 2021-03-31 18:11 ` Антон Мидюков 2021-03-31 18:24 ` Michael Shigorin 2021-03-31 19:02 ` Leonid Krivoshein 2021-03-31 18:38 ` Alexey Gladkov 2021-03-31 18:49 ` Leonid Krivoshein 2021-03-31 19:20 ` Leonid Krivoshein 2021-04-01 2:32 ` Антон Мидюков 2021-03-31 18:44 ` Leonid Krivoshein 2021-03-31 18:45 ` Alexey Gladkov 2021-03-31 23:49 ` Leonid Krivoshein [this message] 2021-04-01 9:02 ` Alexey Gladkov 2021-04-01 10:38 ` Leonid Krivoshein 2021-04-02 17:46 ` Leonid Krivoshein 2021-04-02 17:57 ` Leonid Krivoshein 2021-04-04 19:04 ` Konstantin Lepikhov 2021-04-04 19:21 ` Leonid Krivoshein 2021-04-02 18:37 ` Leonid Krivoshein 2021-04-03 11:09 ` Alexey Gladkov 2021-04-03 11:31 ` Leonid Krivoshein 2021-04-03 11:37 ` Антон Мидюков 2021-04-03 12:16 ` Leonid Krivoshein 2021-04-03 12:27 ` Антон Мидюков 2021-04-03 11:59 ` Alexey Gladkov
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=e4c03eb1-6b9b-889b-e8b7-cdea8c7490ca@gmail.com \ --to=klark.devel@gmail.com \ --cc=make-initrd@lists.altlinux.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
Make-initrd development discussion This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/make-initrd/0 make-initrd/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 make-initrd make-initrd/ http://lore.altlinux.org/make-initrd \ make-initrd@lists.altlinux.org make-initrd@lists.altlinux.ru make-initrd@lists.altlinux.com public-inbox-index make-initrd Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.make-initrd AGPL code for this site: git clone https://public-inbox.org/public-inbox.git