Re: Fixing swap1_stop

2017-08-23 Thread Ian D. Leroux
On Wed, Aug 23, 2017, at 07:02, Christos Zoulas wrote: > In article , > J. Hannken-Illjes wrote: > > > >> On 19. Aug 2017, at 14:20, Christos Zoulas > >> wrote: > >> > >> On Aug 19, 1:04pm, hann...@eis.cs.tu-bs.de ("J. Hannken-Illjes") &

Re: Fixing swap1_stop

2017-08-23 Thread Christos Zoulas
In article , J. Hannken-Illjes wrote: > >> On 19. Aug 2017, at 14:20, Christos Zoulas wrote: >> >> On Aug 19, 1:04pm, hann...@eis.cs.tu-bs.de ("J. Hannken-Illjes") wrote: >> -- Subject: Re: Fixing swap1_stop >> >> | A long time ago forced

Re: Fixing swap1_stop

2017-08-23 Thread J. Hannken-Illjes
> On 19. Aug 2017, at 14:20, Christos Zoulas wrote: > > On Aug 19, 1:04pm, hann...@eis.cs.tu-bs.de ("J. Hannken-Illjes") wrote: > -- Subject: Re: Fixing swap1_stop > > | A long time ago forced unmounts tried to change open block device nodes > | to anonymous

Re: Fixing swap1_stop

2017-08-19 Thread Robert Elz
Date:Sat, 19 Aug 2017 13:04:34 +0200 From:"J. Hannken-Illjes" Message-ID: <03d89673-5cff-432b-acbd-0878a9064...@eis.cs.tu-bs.de> | Did you mean something like this? Christos replied already, but yes, that was what I meant. kre

Re: Fixing swap1_stop

2017-08-19 Thread Christos Zoulas
On Aug 19, 1:04pm, hann...@eis.cs.tu-bs.de ("J. Hannken-Illjes") wrote: -- Subject: Re: Fixing swap1_stop | A long time ago forced unmounts tried to change open block device nodes | to anonymous (not attached to a file system) nodes. This was racy and | has been removed. | | With

Re: Fixing swap1_stop

2017-08-19 Thread J. Hannken-Illjes
> On 18. Aug 2017, at 10:16, Robert Elz wrote: > > After thinking about this (that is, the original problem here, > not the mount changes, which are useful for other reasons - the > reason I did the implementation I showed is that I have a very > similar need in some of my scripts, where I have

Re: Fixing swap1_stop

2017-08-18 Thread Christos Zoulas
On Aug 18, 3:16pm, k...@munnari.oz.au (Robert Elz) wrote: -- Subject: Re: Fixing swap1_stop I think Hannken can answer this... christos | After thinking about this (that is, the original problem here, | not the mount changes, which are useful for other reasons - the | reason I did the

Re: Fixing swap1_stop

2017-08-18 Thread Robert Elz
After thinking about this (that is, the original problem here, not the mount changes, which are useful for other reasons - the reason I did the implementation I showed is that I have a very similar need in some of my scripts, where I have just been "knowing" that I never have weird chars, like spac

Re: Fixing swap1_stop

2017-08-17 Thread Robert Elz
Date:Thu, 17 Aug 2017 21:36:18 -0400 From:"Ian D. Leroux" Message-ID: <20170817213618.1c7316846f102e054bf89...@fastmail.fm> | Fair enough, though I don't find inserting '\'' much harder | (particularly since there's already a function in our standard library | t

Re: Fixing swap1_stop

2017-08-17 Thread Christos Zoulas
On Aug 17, 9:36pm, idler...@fastmail.fm ("Ian D. Leroux") wrote: -- Subject: Re: Fixing swap1_stop | > | | > | MY_MOUNTED_DEVICE=$(mount -F %d) | > | > Sure (not exactly that I don't think, as without some arg to mount, | > you'd get all of them lis

Re: Fixing swap1_stop

2017-08-17 Thread Ian D. Leroux
On Thu, 17 Aug 2017 15:12:07 +0700 Robert Elz wrote: > Date:Wed, 16 Aug 2017 22:25:40 -0400 > From:"Ian D. Leroux" > Message-ID: <20170816222540.de4ac3150f5ec12713a91...@fastmail.fm> > > | If we $'' the filenames, then we have to make > | sure that the filename c

Re: Fixing swap1_stop

2017-08-17 Thread Steffen Nurpmeso
(I feel a bit like Errol Flynn in Against All Flags) Robert Elz wrote: |Date:Wed, 16 Aug 2017 22:25:40 -0400 |From:"Ian D. Leroux" |Message-ID: <20170816222540.de4ac3150f5ec12713a91...@fastmail.fm> | || Ok, but in that case I think that traditional single-quotin

Re: Fixing swap1_stop

2017-08-17 Thread Robert Elz
Date:Wed, 16 Aug 2017 22:25:40 -0400 From:"Ian D. Leroux" Message-ID: <20170816222540.de4ac3150f5ec12713a91...@fastmail.fm> | Ok, but in that case I think that traditional single-quoting is | actually more suitable. I disagree there. | If we $'' the filenames,

Re: Fixing swap1_stop

2017-08-16 Thread Ian D. Leroux
On Wed, 16 Aug 2017 15:44:24 +0700 Robert Elz wrote: > | I've never seen $', what is its intended meaning? > > Most other shells have it these days, and it is likely to be added to > posix, it is almost identical to '' quoting, except allows all the > normal C type escapes (\ sequences) to be u

Re: Fixing swap1_stop

2017-08-16 Thread Ian D. Leroux
On Tue, 15 Aug 2017 22:46:28 -0400 chris...@zoulas.com (Christos Zoulas) wrote: > On Aug 15, 9:33pm, idler...@fastmail.fm ("Ian D. Leroux") wrote: > -- Subject: Re: Fixing swap1_stop > > | On Tue, 15 Aug 2017 02:11:37 -0400 chris...@zoulas.com (Christos > | Zoulas) wrot

Re: Fixing swap1_stop

2017-08-16 Thread Robert Elz
Date:Tue, 15 Aug 2017 21:19:00 -0400 From:"Ian D. Leroux" Message-ID: <20170815211900.e483cf4b0ec260b798d08...@fastmail.fm> | What's the use-case for this? If I want the filesystem to be mounted | in its current state, I do nothing. To be able to mount back to c

Re: Fixing swap1_stop

2017-08-15 Thread Christos Zoulas
On Aug 15, 9:33pm, idler...@fastmail.fm ("Ian D. Leroux") wrote: -- Subject: Re: Fixing swap1_stop | On Tue, 15 Aug 2017 02:11:37 -0400 chris...@zoulas.com (Christos | Zoulas) wrote: | | > On Aug 14, 10:50am, idler...@fastmail.fm ("Ian D. Leroux") wrote: | > -- Subj

Re: Fixing swap1_stop

2017-08-15 Thread Ian D. Leroux
On Tue, 15 Aug 2017 02:11:37 -0400 chris...@zoulas.com (Christos Zoulas) wrote: > On Aug 14, 10:50am, idler...@fastmail.fm ("Ian D. Leroux") wrote: > -- Subject: Re: Fixing swap1_stop > > | Any preferences for a conveniently-parseable format? My first > | instinct is

Re: Fixing swap1_stop

2017-08-15 Thread Ian D. Leroux
On Tue, 15 Aug 2017 16:20:41 +0700 Robert Elz wrote: > | Any preferences for a conveniently-parseable format? > > I'd prefer to omit sh commands that will cause the mount to be > performed, so that the filesystem returns to its current state. What's the use-case for this? If I want the filesy

Re: Fixing swap1_stop

2017-08-15 Thread Robert Elz
Date:Mon, 14 Aug 2017 10:50:01 -0400 From:"Ian D. Leroux" Message-ID: <1502722201.165795.1072902592.394c1...@webmail.messagingengine.com> | > I am not sure if it is a good idea to change the output in the default | > case. Perhaps we should add a flag to make the

Re: Fixing swap1_stop

2017-08-14 Thread Christos Zoulas
On Aug 14, 10:50am, idler...@fastmail.fm ("Ian D. Leroux") wrote: -- Subject: Re: Fixing swap1_stop | Any preferences for a conveniently-parseable format? My first | instinct is to simply drop the spacer words ("on", "type"), | systematically shquote() the de

Re: Fixing swap1_stop

2017-08-14 Thread Ian D. Leroux
On Mon, Aug 14, 2017, at 02:12, Christos Zoulas wrote: > On Aug 13, 7:57pm, idler...@fastmail.fm ("Ian D. Leroux") wrote: > -- Subject: Re: Fixing swap1_stop > > | On Wed, 9 Aug 2017 03:38:20 -0400 chris...@zoulas.com (Christos Zoulas) > | wrote: > | > I think

Re: Fixing swap1_stop

2017-08-13 Thread Christos Zoulas
On Aug 13, 7:57pm, idler...@fastmail.fm ("Ian D. Leroux") wrote: -- Subject: Re: Fixing swap1_stop | On Wed, 9 Aug 2017 03:38:20 -0400 chris...@zoulas.com (Christos Zoulas) | wrote: | > I think it is better to modify mount to either pass a format string | > to it or to quote

Re: Fixing swap1_stop

2017-08-13 Thread Ian D. Leroux
On Wed, 9 Aug 2017 03:38:20 -0400 chris...@zoulas.com (Christos Zoulas) wrote: > I think it is better to modify mount to either pass a format string > to it or to quote the pathnames so that the output is predictable. Here's my second attempt at the latter solution (the first attempt involved writ

Re: Fixing swap1_stop

2017-08-09 Thread Ian D. Leroux
On Wed, Aug 9, 2017, at 03:38, Christos Zoulas wrote: > I think it is better to modify mount to either pass a format string to > it or to quote the pathnames so that the output is predictable. That sounds like a good feature in general. I might have a go at it this weekend. I see (from a comment

Re: Fixing swap1_stop

2017-08-09 Thread Christos Zoulas
On Aug 8, 9:26pm, idler...@fastmail.fm ("Ian D. Leroux") wrote: -- Subject: Re: Fixing swap1_stop | I append a patch that does just that (almost identical to the code you | suggested, except that I'm a bit more paranoid when parsing the name of | the mount point). I've teste

Re: Fixing swap1_stop

2017-08-08 Thread Ian D. Leroux
On Tue, 08 Aug 2017 09:10:53 -0400 "Ian D. Leroux" wrote: > On Thu, Aug 3, 2017, at 08:00, Ian D. Leroux wrote: > > On Thu, 3 Aug 2017 10:54:30 + (UTC) chris...@astron.com > > (Christos Zoulas) wrote: > > > > > In article <20170802215811.02ff2faba38001ebe4f53...@fastmail.fm>, > > > Ian D. Ler

Re: Fixing swap1_stop

2017-08-08 Thread Ian D. Leroux
On Thu, Aug 3, 2017, at 08:00, Ian D. Leroux wrote: > On Thu, 3 Aug 2017 10:54:30 + (UTC) chris...@astron.com (Christos > Zoulas) wrote: > > > In article <20170802215811.02ff2faba38001ebe4f53...@fastmail.fm>, > > Ian D. Leroux wrote: > > >The patches stop swap1_stop from blindly unmounting a t

Re: Fixing swap1_stop

2017-08-03 Thread Ian D. Leroux
On Thu, 3 Aug 2017 10:54:30 + (UTC) chris...@astron.com (Christos Zoulas) wrote: > In article <20170802215811.02ff2faba38001ebe4f53...@fastmail.fm>, > Ian D. Leroux wrote: > >The patches stop swap1_stop from blindly unmounting > >a tmpfs-mounted /dev/while the system is still running multi-us

Re: Fixing swap1_stop

2017-08-03 Thread Christos Zoulas
In article <20170802215811.02ff2faba38001ebe4f53...@fastmail.fm>, Ian D. Leroux wrote: >For the last year or so I've been carrying a set of local patches >to /etc/rc.d/swap1, /etc/defaults/rc.conf and the attendant >documentation. The patches stop swap1_stop from blindly unmounting >a tmpfs-mount