* Re: [OE-core] [update-rc.d][PATCH] update-rc.d: Fix enable/disable command [not found] <168DFB55CCAE8B91.30759@lists.openembedded.org> @ 2021-07-02 13:57 ` Einar Gunnarsson 2021-07-02 21:46 ` Alexandre Belloni 0 siblings, 1 reply; 3+ messages in thread From: Einar Gunnarsson @ 2021-07-02 13:57 UTC (permalink / raw) To: Einar Jon Gunnarsson; +Cc: openembedded-core [-- Attachment #1: Type: text/plain, Size: 1701 bytes --] I forgot the third error in this line: Links numbered 91 or higher will create a single digit link. # update-rc.d -v -n smack disable rename /etc/rc2.d/S91smack -> /etc/rc2.d/K9smack I guess this fixes all three: printf -v newnn "%02d" $((100-${oldnn#0})) How do I resubmit a patch? On Fri, 2 Jul 2021 at 15:10, Einar Gunnarsson via lists.openembedded.org <tolvupostur=gmail.com@lists.openembedded.org> wrote: > $[] is a bashism and does not work on POSIX shells > > enable/disable on links numbered 08 and 09 gives the error: > 'bash: 100-08: value too great for base (error token is "08")' > > Signed-off-by: Einar Gunnarsson <tolvupostur@gmail.com> > --- > update-rc.d | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/update-rc.d b/update-rc.d > index c9355d7..24ac752 100644 > --- a/update-rc.d > +++ b/update-rc.d > @@ -114,7 +114,7 @@ renamelink() > # or stop link to start link with a sequence number equal to the > difference of 100 minus the original sequence number. > if ls ${etcd}${lev}.d/${oldstartstop}*${bn} >/dev/null 2>&1; then > oldnn=`basename ${etcd}${lev}.d/${oldstartstop}*${bn}|cut > -c2-3` > - newnn=$[100-$oldnn] > + newnn=$((100-${oldnn#0})) > [ $verbose -eq 1 ] && echo "rename > ${etcd}${lev}.d/${oldstartstop}${oldnn}${bn} -> > ${etcd}${lev}.d/${newstartstop}${newnn}${bn}" > if [ $notreally -eq 0 ];then > mv ${etcd}${lev}.d/${oldstartstop}${oldnn}${bn} > ${etcd}${lev}.d/${newstartstop}${newnn}${bn} > -- > 2.17.1 > > > > > -- Regards Einar Jón +31 610 957234 [-- Attachment #2: Type: text/html, Size: 2374 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [OE-core] [update-rc.d][PATCH] update-rc.d: Fix enable/disable command 2021-07-02 13:57 ` [OE-core] [update-rc.d][PATCH] update-rc.d: Fix enable/disable command Einar Gunnarsson @ 2021-07-02 21:46 ` Alexandre Belloni 2021-07-03 15:33 ` Einar Gunnarsson 0 siblings, 1 reply; 3+ messages in thread From: Alexandre Belloni @ 2021-07-02 21:46 UTC (permalink / raw) To: Einar Gunnarsson; +Cc: openembedded-core On 02/07/2021 15:57:03+0200, Einar Gunnarsson wrote: > I forgot the third error in this line: > Links numbered 91 or higher will create a single digit link. > > # update-rc.d -v -n smack disable > rename /etc/rc2.d/S91smack -> /etc/rc2.d/K9smack > > I guess this fixes all three: > > printf -v newnn "%02d" $((100-${oldnn#0})) > > How do I resubmit a patch? > Simply send the new patch with [PATCH v2] instead of [PATCH]. > > On Fri, 2 Jul 2021 at 15:10, Einar Gunnarsson via lists.openembedded.org > <tolvupostur=gmail.com@lists.openembedded.org> wrote: > > > $[] is a bashism and does not work on POSIX shells > > > > enable/disable on links numbered 08 and 09 gives the error: > > 'bash: 100-08: value too great for base (error token is "08")' > > > > Signed-off-by: Einar Gunnarsson <tolvupostur@gmail.com> > > --- > > update-rc.d | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/update-rc.d b/update-rc.d > > index c9355d7..24ac752 100644 > > --- a/update-rc.d > > +++ b/update-rc.d > > @@ -114,7 +114,7 @@ renamelink() > > # or stop link to start link with a sequence number equal to the > > difference of 100 minus the original sequence number. > > if ls ${etcd}${lev}.d/${oldstartstop}*${bn} >/dev/null 2>&1; then > > oldnn=`basename ${etcd}${lev}.d/${oldstartstop}*${bn}|cut > > -c2-3` > > - newnn=$[100-$oldnn] > > + newnn=$((100-${oldnn#0})) > > [ $verbose -eq 1 ] && echo "rename > > ${etcd}${lev}.d/${oldstartstop}${oldnn}${bn} -> > > ${etcd}${lev}.d/${newstartstop}${newnn}${bn}" > > if [ $notreally -eq 0 ];then > > mv ${etcd}${lev}.d/${oldstartstop}${oldnn}${bn} > > ${etcd}${lev}.d/${newstartstop}${newnn}${bn} > > -- > > 2.17.1 > > > > > > > > > > > > -- > Regards > Einar Jón > +31 610 957234 > > > -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [OE-core] [update-rc.d][PATCH] update-rc.d: Fix enable/disable command 2021-07-02 21:46 ` Alexandre Belloni @ 2021-07-03 15:33 ` Einar Gunnarsson 0 siblings, 0 replies; 3+ messages in thread From: Einar Gunnarsson @ 2021-07-03 15:33 UTC (permalink / raw) To: Alexandre Belloni; +Cc: openembedded-core [-- Attachment #1: Type: text/plain, Size: 2460 bytes --] Ok. I messed up the prefix, so the mail is separate... https://lists.openembedded.org/g/openembedded-core/message/153509 On Fri, 2 Jul 2021 at 23:46, Alexandre Belloni < alexandre.belloni@bootlin.com> wrote: > On 02/07/2021 15:57:03+0200, Einar Gunnarsson wrote: > > I forgot the third error in this line: > > Links numbered 91 or higher will create a single digit link. > > > > # update-rc.d -v -n smack disable > > rename /etc/rc2.d/S91smack -> /etc/rc2.d/K9smack > > > > I guess this fixes all three: > > > > printf -v newnn "%02d" $((100-${oldnn#0})) > > > > How do I resubmit a patch? > > > > Simply send the new patch with [PATCH v2] instead of [PATCH]. > > > > > On Fri, 2 Jul 2021 at 15:10, Einar Gunnarsson via lists.openembedded.org > > <tolvupostur=gmail.com@lists.openembedded.org> wrote: > > > > > $[] is a bashism and does not work on POSIX shells > > > > > > enable/disable on links numbered 08 and 09 gives the error: > > > 'bash: 100-08: value too great for base (error token is "08")' > > > > > > Signed-off-by: Einar Gunnarsson <tolvupostur@gmail.com> > > > --- > > > update-rc.d | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/update-rc.d b/update-rc.d > > > index c9355d7..24ac752 100644 > > > --- a/update-rc.d > > > +++ b/update-rc.d > > > @@ -114,7 +114,7 @@ renamelink() > > > # or stop link to start link with a sequence number equal to > the > > > difference of 100 minus the original sequence number. > > > if ls ${etcd}${lev}.d/${oldstartstop}*${bn} >/dev/null 2>&1; > then > > > oldnn=`basename > ${etcd}${lev}.d/${oldstartstop}*${bn}|cut > > > -c2-3` > > > - newnn=$[100-$oldnn] > > > + newnn=$((100-${oldnn#0})) > > > [ $verbose -eq 1 ] && echo "rename > > > ${etcd}${lev}.d/${oldstartstop}${oldnn}${bn} -> > > > ${etcd}${lev}.d/${newstartstop}${newnn}${bn}" > > > if [ $notreally -eq 0 ];then > > > mv ${etcd}${lev}.d/${oldstartstop}${oldnn}${bn} > > > ${etcd}${lev}.d/${newstartstop}${newnn}${bn} > > > -- > > > 2.17.1 > > > > > > > > > > > > > > > > > > > -- > > Regards > > Einar Jón > > +31 610 957234 > > > > > > > > > > -- > Alexandre Belloni, co-owner and COO, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com > -- Regards Einar Jón +31 610 957234 [-- Attachment #2: Type: text/html, Size: 3753 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-03 15:33 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <168DFB55CCAE8B91.30759@lists.openembedded.org> 2021-07-02 13:57 ` [OE-core] [update-rc.d][PATCH] update-rc.d: Fix enable/disable command Einar Gunnarsson 2021-07-02 21:46 ` Alexandre Belloni 2021-07-03 15:33 ` Einar Gunnarsson
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.