Re: [PATCH] traceroute: free some dynamically allocated blocks returned by xzalloc()

2013-03-08 Thread Joshua Judson Rosen
On 2013-03-08 14:38, Guilherme Maciel Ferreira wrote: Hi, the documentation says the Busybox leaves to exit() the responsability of applet's memory clean up. But you guys avoid any memory deallocation that can be released when the applet exit (to save size)? That is what it says in busybox's T

ash: "source " makes ash exit?

2013-03-15 Thread Joshua Judson Rosen
I just noticed that trying to source a nonexistent file from a script running (non-interactively) through ash causes the shell to exit. Debian's "dash" shell doesn't do this, and versions of bash before 4.2 apparently don't do this even when invoked with "--posix" (it looks like bash's posix mode

Re: ash: "source " makes ash exit?

2013-03-17 Thread Joshua Judson Rosen
On 2013-03-17 09:56, Denys Vlasenko wrote: On Friday 15 March 2013 21:54, Joshua Judson Rosen wrote: I just noticed that trying to source a nonexistent file from a script running (non-interactively) through ash causes the shell to exit. Debian's "dash" shell doesn't do t

Re: ash: "source " makes ash exit?

2013-03-18 Thread Joshua Judson Rosen
On 2013-03-18 05:38, Bernd Petrovitsch wrote: Hi! On Mon, 2013-03-18 at 10:09 +0100, Bastian Bittorf wrote: * Joshua Judson Rosen [18.03.2013 09:58]: failure to dot/source a file can still result in an error-message without making the shell quit. In order to do that, I had to slightly adjust

Re: ash: "source " makes ash exit?

2013-03-18 Thread Joshua Judson Rosen
On 2013-03-18 14:17, Joshua Judson Rosen wrote: `luckily', the other popular bourne shells (e.g.: bash, dash/ash, ksh) seem to all actually behave contrary to POSIX on this matter; Ugh--I take it back about dash/ash--dash/ash actually behave according to POSIX, here. :\ I was runn

Re: ash: "source " makes ash exit?

2013-03-18 Thread Joshua Judson Rosen
On 2013-03-18 14:37, Bastian Bittorf wrote: * Joshua Judson Rosen [18.03.2013 19:32]: [ -e "$file" ]&& . "$file" not ok for you? my usecase was more a "speed" issue, because The only technical reason against that is the race condition if $file is

Re: ash: "source " makes ash exit?

2013-03-18 Thread Joshua Judson Rosen
On 2013-03-18 15:44, Mike Frysinger wrote: On Monday 18 March 2013 14:17:42 Joshua Judson Rosen wrote: `luckily', the other popular bourne shells (e.g.: bash, dash/ash, ksh) seem to all actually behave contrary to POSIX on this matter; portable scripts already have to do ". $file |

New shell command: prlimit

2013-05-22 Thread Joshua Judson Rosen
The attached patch adds a new shell builtin, "prlimit", which is similar to ulimit but can operate on any process (not just the current process), by using Linux's prlimit() function. prlimit takes a PID as a first argument, and then processes the rest of its arguments identically to ulimit, e.g.:

Re: New shell command: prlimit

2013-05-23 Thread Joshua Judson Rosen
On 2013-05-23 09:14, Denys Vlasenko wrote: On Thu, May 23, 2013 at 4:53 AM, Joshua Judson Rosen wrote: The attached patch adds a new shell builtin, "prlimit", which is similar to ulimit but can operate on any process (not just the current process), by using Linux's prl

Re: [TROLL] Thank you for not using autoconf

2013-06-01 Thread Joshua Judson Rosen
On 2013-05-31 14:46, Mike Frysinger wrote: On Friday 31 May 2013 10:43:17 Jon Schneider wrote: Thank you for making this work and please don't let anyone tell you to start using GNU autoconf and friends. They're absolute crap for most packages when cross building. not to go way off topic for t

Re: Date doesn't like field separators

2013-09-25 Thread Joshua Judson Rosen
On 2013-09-25 15:49, Jody Lee Bruchon wrote: I am using the date command to process dates from a text file in the typical American "mm/dd/" format. The date command chokes if I pass such a date with -d for reformatting; likewise, dashes aren't accepted at all either. I am having to pipe thr

Re: Question about the installation directory of programs

2013-11-07 Thread Joshua Judson Rosen
On 2013-11-07 01:56, ChenQi wrote: Hi all, Forgive me if this is a dummy question. I see the installation directories of programs are controlled by the applets.src.h file. Some of them are installed into /usr while some of them are not. Is there a criteria to determine whether a program goes int

busybox syslogd doesn't notice hostname change?

2014-02-27 Thread Joshua Judson Rosen
I've noticed that, if I change my system's hostname, busybox syslogd doesn't notice until it's restarted; the code in syslogd.c currently just caches the hostname at startup and then never checks it again. inetutils syslogd does the same thing; syslog-ng and rsyslog both rescan on SIGHUP (but

[PATCH] syslogd: support external logrotate command

2014-05-19 Thread Joshua Judson Rosen
Configurable at build time. Invoke "syslogd -c logrotate" to call out to "logrotate" when it's time to rotate log-files. Signed-off-by: Joshua Judson Rosen --- sysklogd/Config.src |9 + sysklogd/syslogd.c | 32 +++- 2 fil

[PATCH 1/3] syslogd: avoid spurious ftrunctate() calls for "-b 0"

2014-05-19 Thread Joshua Judson Rosen
Forgetting to re-set log_file->size after truncating to zero discards log-data for the next 1 second following an oversize-induced purge, when we shouldn't necessarily throw that data away. Signed-off-by: Joshua Judson Rosen --- sysklogd/syslogd.c |6 ++ 1 file changed, 6 in

[PATCH 2/3] syslogd: remember to un-writelock log-files even when called with "-b 0"

2014-05-19 Thread Joshua Judson Rosen
Signed-off-by: Joshua Judson Rosen --- sysklogd/syslogd.c |4 1 file changed, 4 insertions(+) diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index 2c959ff..d77fc94 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c @@ -670,6 +670,10 @@ static void log_locally(time_t now

[PATCH 3/3] syslogd: Unify unlink/truncate + unlock log-rotation logic

2014-05-19 Thread Joshua Judson Rosen
Always unlink + reopen, rather than sometimes using ftruncate(); using a single code-path reduces the opportunity for either mistakes or duplicate code. Signed-off-by: Joshua Judson Rosen --- sysklogd/syslogd.c | 30 +++--- 1 file changed, 11 insertions(+), 19

[PATCH] syslogd: try to handle ENOSPC during writes

2014-05-19 Thread Joshua Judson Rosen
Unlink the oldest rotated-out logfile and then try writing the rest of the msg. Signed-off-by: Joshua Judson Rosen --- sysklogd/Config.src |9 ++ sysklogd/syslogd.c | 79 --- 2 files changed, 78 insertions(+), 10 deletions(-) diff

[PATCH] syslogd: allow use of timestamps on rotated logfile-names rather than series-numbers

2014-05-19 Thread Joshua Judson Rosen
Configurable at build time. Timestamp-based names are stable, which can be invaluable if someone needs to process logs on a running system; e.g.: creating a tarball of logs when a rotation might happen at any moment. Signed-off-by: Joshua Judson Rosen --- sysklogd/Config.src |8

[PATCH] syslogd: let log-message timestamps include the year

2014-05-19 Thread Joshua Judson Rosen
Configurable at build time. Signed-off-by: Joshua Judson Rosen --- sysklogd/Config.src | 11 +++ sysklogd/syslogd.c | 24 +--- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/sysklogd/Config.src b/sysklogd/Config.src index fcf9930..4ca0c02 100644

Re: [PATCH] syslogd: let log-message timestamps include the year

2014-05-20 Thread Joshua Judson Rosen
.2014 07:06, schrieb Joshua Judson Rosen: Configurable at build time. Signed-off-by: Joshua Judson Rosen --- sysklogd/Config.src | 11 +++ sysklogd/syslogd.c | 24 +--- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/sysklogd/Config.src b/syskl

Re: [PATCH] syslogd: let log-message timestamps include the year

2014-05-20 Thread Joshua Judson Rosen
On 2014-05-20 12:59, walter harms wrote: Am 20.05.2014 18:35, schrieb Joshua Judson Rosen: On 2014-05-20 03:23, walter harms wrote: just, an idea is it possible to make it more generic e.g. providing format string like "%Y-%m-%d %H:%M:%S" ? That would be more flexible. Sure. I

Re: [PATCH] syslogd: support external logrotate command

2014-05-20 Thread Joshua Judson Rosen
Hrm. Apparently there's a bug, not in this patch, that prevents external rotation from working correctly: the "Reopen log file every second" logic in syslogd doesn't reopen _all_ files, just the first one written in that second. On 2014-05-20 01:08, Joshua Judson Rosen wro

Re: [PATCH] syslogd: support external logrotate command

2014-05-20 Thread Joshua Judson Rosen
On 2014-05-20 18:09, Joshua Judson Rosen wrote: Hrm. Apparently there's a bug, not in this patch, that prevents external rotation from working correctly: the "Reopen log file every second" logic in syslogd doesn't reopen _all_ files, just the first one written in that se

[PATCH] syslogd: make "reopen log file every second" logic work for multiple logs

2014-05-20 Thread Joshua Judson Rosen
-off-by: Joshua Judson Rosen --- sysklogd/syslogd.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index a6a4ff2..98c60ea 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c @@ -110,6 +110,7 @@ typedef struct

Re: [PATCH] syslogd: support external logrotate command

2014-05-20 Thread Joshua Judson Rosen
On 2014-05-20 20:36, Laurent Bercot wrote: +IF_FEATURE_LOGROTATE_CMD( +if (G.logrotateCmd) { +system(G.logrotateCmd); It would be a good idea to test the return code of the external command and schedule a later rotation if it is nonzero. Hmm. I suppose I it could

Re: [PATCH] syslogd: support external logrotate command

2014-05-20 Thread Joshua Judson Rosen
On 2014-05-20 21:12, Joshua Judson Rosen wrote: On 2014-05-20 20:36, Laurent Bercot wrote: +IF_FEATURE_LOGROTATE_CMD( +if (G.logrotateCmd) { +system(G.logrotateCmd); It would be a good idea to test the return code of the external command and schedule a later

Re: [PATCH] syslogd: support external logrotate command

2014-05-20 Thread Joshua Judson Rosen
On 2014-05-20 21:45, Joshua Judson Rosen wrote: On 2014-05-20 21:12, Joshua Judson Rosen wrote: On 2014-05-20 20:36, Laurent Bercot wrote: +IF_FEATURE_LOGROTATE_CMD( +if (G.logrotateCmd) { +system(G.logrotateCmd); It would be a good idea to test the return code

Re: [PATCH] syslogd: make "reopen log file every second" logic work for multiple logs

2014-05-21 Thread Joshua Judson Rosen
Oops--forgot to initialise last_log_time On 2014-05-20 19:20, Joshua Judson Rosen wrote: Move last_log_time from a single global to *each logFile_t* so that we can actually apply the logic to every log-file in multi-file configurations, rather than working only for the first file written in

[PATCH] syslogd: make "reopen log file every second" logic work for multiple logs

2014-05-21 Thread Joshua Judson Rosen
-off-by: Joshua Judson Rosen --- sysklogd/syslogd.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index a6a4ff2..a935192 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c @@ -110,6 +110,7 @@ typedef struct

[PATCH] syslogd: don't *decrement* log_file->size on write-failures

2014-05-22 Thread Joshua Judson Rosen
Even if we fail to write to a log-file, and it's not growing, it's not *shrinking* either Signed-off-by: Joshua Judson Rosen --- sysklogd/syslogd.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c ind

[PATCH] syslogd: try to handle ENOSPC during writes

2014-05-22 Thread Joshua Judson Rosen
Unlink the oldest rotated-out logfile and then try writing the rest of the msg if there's a chance that the retry will succeed. Signed-off-by: Joshua Judson Rosen --- sysklogd/Config.src |9 + sysklogd/syslogd.c | 112 ++- 2

Re: keeping as much persistent log-data as will possibly fit (was: [PATCH] syslogd: try to handle ENOSPC during writes)

2014-05-23 Thread Joshua Judson Rosen
eed a patch like this) (I'm hoping the the _other_ patches are _not_ controversial...) On 2014-05-23 01:50, Joshua Judson Rosen wrote: Unlink the oldest rotated-out logfile and then try writing the rest of the msg if there's a chance that the retry will succeed. Sig

Re: keeping as much persistent log-data as will possibly fit

2014-05-23 Thread Joshua Judson Rosen
On 2014-05-23 14:55, Laurent Bercot wrote: On 23/05/2014 18:59, Joshua Judson Rosen wrote: Especially if anyone else has been in the same sort of situation (really needing to keep as much persistent log-data as will possibly fit into their available storage) and especially if you've found

Re: Issues removing files with certain characters in their names.

2014-05-29 Thread Joshua Judson Rosen
But why is ls able to match the files when rm is not able to remove them? Is it perhaps because ls is not actually doing any operations on the files themselves (not even a stat?), and just reporting the dirent->d_name strings that it got from readdir()? In which case "ls -l *" would fail on the s

Re: [PATCH 3/3] syslogd: Unify unlink/truncate + unlock log-rotation logic

2014-06-02 Thread Joshua Judson Rosen
On 2014-06-01 21:12, Denys Vlasenko wrote: On Tuesday 20 May 2014 07:02, Joshua Judson Rosen wrote: Always unlink + reopen, rather than sometimes using ftruncate(); using a single code-path reduces the opportunity for either mistakes or duplicate code. Signed-off-by: Joshua Judson Rosen

Re: keeping as much persistent log-data as will possibly fit

2014-06-02 Thread Joshua Judson Rosen
On 2014-05-23 16:32, Cathey, Jim wrote: Another issue that is often not thought about by many embedded developers, is that flash devices slow down with wear. Excessive logging to flash eventually results in a device that might no longer meet its performance objectives. The flashes I'm most fami

Re: Shell test or quoting mechanism breaks on parens

2014-06-04 Thread Joshua Judson Rosen
On 2014-05-19 22:10, Rich Felker wrote: On Mon, May 19, 2014 at 05:02:48PM -0500, dung_ngu...@dell.com wrote: Dell - Internal Use - Confidential Hello, I used to use busybox 1.00 and this command line returns 0 or at least the output is the same as RHEL 5.3 shell: # [ '(' = '(' ] ; rc=$? ;

Re: [PATCH] syslogd: don't *decrement* log_file->size on write-failures

2014-07-01 Thread Joshua Judson Rosen
Ping. Can this be applied upstream? On 2014-05-22 15:42, Joshua Judson Rosen wrote: Even if we fail to write to a log-file, and it's not growing, it's not *shrinking* either Signed-off-by: Joshua Judson Rosen --- sysklogd/syslogd.c | 11 ++- 1 file changed, 10

Re: [PATCH] syslogd: support external logrotate command

2014-07-02 Thread Joshua Judson Rosen
On 2014-07-02 09:36, Denys Vlasenko wrote: How about using svlogd? Do you mean instead of syslogd? svlogd doesn't appear to be syslog compatible I'm not really up for patching every piece of software I use so that it uses a different logging system. :( Also, even if I did that, it looks

Re: [PATCH] syslogd: support external logrotate command

2014-07-02 Thread Joshua Judson Rosen
On 2014-07-02 09:44, Laurent Bercot wrote: On 07/02/2014 02:36 PM, Denys Vlasenko wrote: How about using svlogd? That would be a better idea indeed. The complete case against syslog can be read here: http://skarnet.org/software/s6/s6-log.html#diesyslogdiedie I'd agree with some of thos

Re: [PATCH] syslogd: let log-message timestamps include the year

2014-07-02 Thread Joshua Judson Rosen
On 2014-07-02 09:34, Denys Vlasenko wrote: The "right" solution would be to petition your libc maintainers to deprecate "Month DD hh:mm:ss" silliness and start using sensible (and not i18n-butchered) timestamps in syslog()-generated messages. (My personal opinion is that -mm-dd hh:mm:ss is m

Re: [PATCH] syslogd: allow use of timestamps on rotated logfile-names rather than series-numbers

2014-07-02 Thread Joshua Judson Rosen
On 2014-07-02 09:17, Denys Vlasenko wrote: I feel it is not optimal to spend time improving *syslogd* logging, it's better to work on improving a generic logging utility. busybox has one: it's svlogd, adopted from runit project. It already has a number of things you are proposing: $ busybox svl

Re: [PATCH] syslogd: support external logrotate command

2014-07-02 Thread Joshua Judson Rosen
On 2014-07-02 13:30, Denys Vlasenko wrote: On Wed, Jul 2, 2014 at 4:33 PM, Joshua Judson Rosen wrote: On 2014-07-02 09:36, Denys Vlasenko wrote: How about using svlogd? Do you mean instead of syslogd? No, I mean that syslog can pipe output to svlogd, which then can logrotate it

Re: [PATCH] syslogd: support external logrotate command

2014-07-02 Thread Joshua Judson Rosen
On 2014-07-02 14:20, Denys Vlasenko wrote: Pity that no major distribution attempted to rework iniscripts/services to be based on daemontools and its several clones. I guess it's because daemontools author was not a community building type of person, and no one else picked up the tab either. "

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-02 Thread Joshua Judson Rosen
On 2014-09-01 09:50, Harald Becker wrote: IMO to display the usage information with --help is a successful execution and shall return 0 as other commands does, but I see the problem when the return value of false may be tricked by giving the --help parameter ... as this compatibility with GNU ut

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-02 Thread Joshua Judson Rosen
On 2014-09-02 14:22, Harald Becker wrote: Hi Joshua ! It's also interesting that busybox "false --help" behaves completely differently depending on whether it's invoked from within a busybox shell or not: This is wrong! Hi Harald-- It might be wrong, but it's nonetheless true and not a mis

Re: What's the easiest way to make Busybox keep correct time?

2014-09-02 Thread Joshua Judson Rosen
On 2014-09-01 07:00, Harald Becker wrote: Hi ! Actually, the hwclock time is what's inaccurate :-( ... bad hardware! That is very interesting but since this system is always connected to the Internet, I'm not sure I need to be that concerned about the hardware clock. If your system is alw

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-05 Thread Joshua Judson Rosen
i.e.: GNU "false --help" `fails', just like in POSIX and in Busybox's `other false' (the builtin "false"/falsecmd() in ash). So can we just fix it? What did you think of the patch that I sent? On 2014-09-03 11:13, Denys Vlasenko wrote: $ /bin/false --version false (GNU coreutils) 8.7 ... $ /

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-05 Thread Joshua Judson Rosen
On 2014-09-05 12:39, Xabier Oneca -- xOneca wrote: It might be nice if "false --help" would return false, but it would add extra code to busybox for no real benefit. How many bytes are in game here? Looks like 16 bytes of difference, compiling on my amd64 laptop. -- "'tis an ill wind that b

Re: [Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

2014-09-16 Thread Joshua Judson Rosen
On 2014-09-05 12:26, Ralf Friedl wrote: Xabier Oneca -- xOneca wrote: Hello again, 2014-09-05 18:19 GMT+02:00 Xabier Oneca -- xOneca : Hello list, I want to highlight what GNU coreutils' help docs (info coreutils 'false invocation') says about false when invoked with --help: Note that `fa

Re: rm -r fails to delete entire hierarchy when path goes in and out of it

2014-09-17 Thread Joshua Judson Rosen
On 2014-09-17 12:52, Cathey, Jim wrote: Pretty sure 'our' upstream rm (in a prior life) expressly prohibited -r on starting paths that contained .. members. Too many weirdo cases where you would get into trouble. GNU rm opens the top-level directory and uses unlinkat(), fstatat(), etc. to remo

[PATCH 2/4] reformime: support multipart/form-data

2014-10-02 Thread Joshua Judson Rosen
HTTP clients use this in stead of "multipart/mixed" when POSTing forms; substantially similar to multipart/mixed. Signed-off-by: Joshua Judson Rosen --- mailutils/reformime.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mailutils/reformime.c b/mailutils/r

[PATCH 1/4] reformime: support binary encoding

2014-10-02 Thread Joshua Judson Rosen
This is important to allow use of reformime in CGI scripts that handle uploads, since web-browsers typically POST using binary rather than base64, 7bit, or 8bit. Signed-off-by: Joshua Judson Rosen --- mailutils/reformime.c | 43 +++ 1 file changed, 39

[PATCH 4/4] reformime: scan for "name" in addition (and in preference) to "filename".

2014-10-02 Thread Joshua Judson Rosen
Signed-off-by: Joshua Judson Rosen --- mailutils/reformime.c | 13 + 1 file changed, 13 insertions(+) diff --git a/mailutils/reformime.c b/mailutils/reformime.c index 0f5d768..303beb7 100644 --- a/mailutils/reformime.c +++ b/mailutils/reformime.c @@ -145,6 +145,8 @@ static int

[PATCH 3/4] reformime: don't skip to the (last) Content-Type before parsing tokens from headers

2014-10-02 Thread Joshua Judson Rosen
The tokens we're looking for (like "name") occur in Content-Disposition, and Content-Disposition may actually occur ahead of, or in the absence of, any Content-Type header; for example in multipart/form-data from an HTTP POST. Signed-off-by: Joshua Judson Rosen --- mailutils/ref

[PATCH 1/2] cksum: add little-endian support (new option: -l)

2014-10-02 Thread Joshua Judson Rosen
From: Matt Cross So that it matches the CRC32 algorithm used by u-boot. Signed-off-by: Matt Cross Signed-off-by: Joshua Judson Rosen --- coreutils/cksum.c | 46 +- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/coreutils/cksum.c

[PATCH 2/2] cksum: support hexadecimal output (new option: -x)

2014-10-02 Thread Joshua Judson Rosen
From: Matt Cross Signed-off-by: Matt Cross Signed-off-by: Joshua Judson Rosen --- coreutils/cksum.c |9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/coreutils/cksum.c b/coreutils/cksum.c index b45233e..c916689 100644 --- a/coreutils/cksum.c +++ b/coreutils

[PATCH] httpd: compile-time option to request that browsers never cache content

2014-10-02 Thread Joshua Judson Rosen
s Signed-off-by: Joshua Judson Rosen --- networking/Config.src | 11 +++ networking/httpd.c|5 + 2 files changed, 16 insertions(+) diff --git a/networking/Config.src b/networking/Config.src index e566469..31ff982 100644 --- a/networking/Config.src +++ b/networki

Re: [PATCH 3/4] reformime: don't skip to the (last) Content-Type before parsing tokens from headers

2014-10-03 Thread Joshua Judson Rosen
On 2014-10-03 03:58, walter harms wrote: Am 02.10.2014 20:12, schrieb Joshua Judson Rosen: The tokens we're looking for (like "name") occur in Content-Disposition, and Content-Disposition may actually occur ahead of, or in the absence of, any Content-Type header; for example in

Re: [PATCH 1/4] reformime: support binary encoding

2014-10-10 Thread Joshua Judson Rosen
Ping? Any takers? On 2014-10-02 14:12, Joshua Judson Rosen wrote: This is important to allow use of reformime in CGI scripts that handle uploads, since web-browsers typically POST using binary rather than base64, 7bit, or 8bit. Signed-off-by: Joshua Judson Rosen --- mailutils/reformime.c

Re: [PATCH] ls: no longer assume a 4-digit year on file timestamp.

2015-02-16 Thread Joshua Judson Rosen
On 02/15/2015 06:06 AM, Steven Honeyman wrote: On 15 February 2015 at 07:38, Explorer wrote: This is a trivial change to allow a 5-digit-or-more year in 'ls' timestamp output. Signed-off-by: Kang-che Sung You realise we're good for almost 8000 more years? :D I guess it can already happen

Re: [PATCH] ls: no longer assume a 4-digit year on file timestamp.

2015-02-17 Thread Joshua Judson Rosen
On 2015-02-17 07:24, Denys Vlasenko wrote: On Tue, Feb 17, 2015 at 5:52 AM, Rich Felker wrote: On Mon, Feb 16, 2015 at 11:16:02PM -0500, Joshua Judson Rosen wrote: On 02/15/2015 06:06 AM, Steven Honeyman wrote: On 15 February 2015 at 07:38, Explorer wrote: This is a trivial change to allow

Re: How shell variables work (was: How to use "read" in Busybox v1.1.1 ?)

2015-05-14 Thread Joshua Judson Rosen
On 05/14/2015 11:51 AM, Michael Conrad wrote: > On 5/14/2015 11:33 AM, Mike Yates wrote: >> On 13 May 2015 at 16:27, Michael Conrad wrote: >>> On 5/13/2015 7:45 AM, Mike Yates wrote: read -p "Enter name: " $name I have found that the "$" is the issue - Busybox will only accept a >>>

Re: How to use "read" in Busybox v1.1.1 ?

2015-05-14 Thread Joshua Judson Rosen
On 05/14/2015 11:58 PM, Michael Conrad wrote: > If you want the widest compatibility with shells, simply say "read > REPLY", and/or actually require the value you read to be "yes" or "y" > before continuing, which is what most people do. > > Also, I like to use "set -e" so that any command which fa

[PATCH] mdev -s: don't mistake inter-device symlinks for separate devices

2015-06-05 Thread Joshua Judson Rosen
e) because the prior behaviour of always using basename() meant that all such symlinks lead to "/dev/device" Signed-off-by: Joshua Judson Rosen --- util-linux/mdev.c | 17 + 1 file changed, 17 insertions(+) diff --git a/util-linux/mdev.c b/util-linux/mdev.c index ca4b

Re: [PATCH] mdev -s: don't mistake inter-device symlinks for separate devices

2015-06-16 Thread Joshua Judson Rosen
ping? On 2015-06-05 19:07, Joshua Judson Rosen wrote: > e.g.: don't mistake the /sys/block/mtdblock*/device symlinks > (which point to the /sys/class/mtd/mtd* character devices) > as being block devices in their own right. > > This was `OK' until 2013-05-13 (&quo

Re: [PATCH RESEND] mdev: fix sysfs traversal with CONFIG_SYSFS_DEPRECATED_V2=y

2015-08-03 Thread Joshua Judson Rosen
Hmm. This is strikingly similar in purpose to the patch that I sent a couple months ago ("mdev -s: don't mistake inter-device symlinks for separate devices"; using a different approach; it wasn't clear to me whether just disabling symlink-traversal entirely was the right thing, but skipping the "de

Re: ash: question about using test with '=' as $1

2015-10-05 Thread Joshua Judson Rosen
On 2015-10-04 13:49, Bastian Bittorf wrote: > while discussing a shellsheck issue[1], i stumpled > upon an interesting behaviour which is weird and > i cannot find it to be a problem when reading POSIX[2] > here, but all tested shells (ash,dash,bash) somehow > break at this: > > user@box:~ x='=' >

Re: [PATCH] mdev: don't follow deprecated sysfs /sys/block symlinks

2015-10-19 Thread Joshua Judson Rosen
On 2015-08-03 17:25, Gregory Fong wrote: > /sys/block will only be scanned with CONFIG_SYSFS_DEPRECATED=y and > deprecated sysfs enabled (using CONFIG_SYSFS_DEPRECATED_V2=y or the > related kernel boot param). In that case, all of /sys/block/* will be > a real directory, so we don't need to follow

Re: dpkg --version

2015-10-20 Thread Joshua Judson Rosen
On 2015-10-20 09:43, linuxcbon linuxcbon wrote: > > On Tue, Oct 20, 2015 at 12:04 PM, Denys Vlasenko > wrote: > > On Mon, Oct 19, 2015 at 2:33 AM, linuxcbon linuxcbon > mailto:linuxc...@gmail.com>> wrote: > > Hello, > > > > can someone please

Re: how to send vendor specific information in dhcp request by using udhcpc

2015-10-26 Thread Joshua Judson Rosen
On 2015-10-26 08:47, aditya kumar wrote: > Hi , > > How do I send vendor speicfic information(OPTION 43) via busybox udhcpc ? "-x"; the syntax it expects is described in "udhcpc --help". -- "Don't be afraid to ask (λf.((λx.xx) (λr.f(rr." ___ busyb

Re: output

2016-01-07 Thread Joshua Judson Rosen
On 2016-01-07 14:43, David Henderson wrote: > As a follow-up, when I call crond with the -L parameter the output is > redirected to the log file. It looks like the default settings (going > to syslog) output to stdout no matter what. Hi David, It's actually not going to stdout, it's going to sys

Re: cron usage

2016-01-08 Thread Joshua Judson Rosen
On 2016-01-08 15:15, David Henderson wrote: > > Thanks for the reply Tito! So does the -c parameter change the > parsing directory from /var/spool/cron/crontabs, Yes. > or does it specify a 'holding' directory for the individual cron jobs? The /etc/cron.d directory to which you're accustomed f

Better (stable) names for rotated logfiles

2012-03-20 Thread Joshua Judson Rosen
I'm working on a patch to make the busybox syslogd's log-rotation facility produce rotated logfiles with stable filename, i.e.: rather than appending a series-number to the filename and rotating the numbers, I append a *timestamp* to the name--and the name of a rotated logfile then never needs

Re: Better (stable) names for rotated logfiles [patch]

2012-03-20 Thread Joshua Judson Rosen
On 20/03/12 15:55, ra...@gmx.de wrote: > I'm working on a patch to make the busybox syslogd's log-rotation > facility produce rotated logfiles with stable filename, i.e.: rather > than appending a series-number to the filename and rotating the > numbers, I append a *timestamp* to the name--and th

Re: Better (stable) names for rotated logfiles

2012-03-21 Thread Joshua Judson Rosen
On 21/03/12 02:46, Laurent Bercot wrote: It's mostly a straightforward change, and easy to #ifdef out--the only `funny' part is that I can't just let the oldest logfile in the series `get rename()'d off the end', but rather need to glob and count the results. What about a parameter that deletes

[patch] new option for syslogd to include year in log timestamps

2012-03-22 Thread Joshua Judson Rosen
Attached is a patch adding a config-option to have syslogd include the year in the timestamps that it writes. I've found that this is useful for long-running systems that don't have a sysadmin watching them most of the time. Probably other people would also find it useful. -- "Don't be afraid to

Re: [patch] new option for syslogd to include year in log timestamps

2012-03-28 Thread Joshua Judson Rosen
On 22/03/12 14:49, Joshua Judson Rosen wrote: Attached is a patch adding a config-option to have syslogd include the year in the timestamps that it writes. I've found that this is useful for long-running systems that don't have a sysadmin watching them most of the time. Probably ot

Re: [PATCH] new applet gethostbyname

2012-07-03 Thread Joshua Judson Rosen
On 2012-07-03 05:11, Baruch Siach wrote: Hi Eial, On Tue, Jul 03, 2012 at 10:57:50AM +0300, Eial Czerwacki wrote: I'd like to propose a new applet, gethostbyname. all this applet does is to get a host name and return the first ip address. IMHO, this applet should be called 'host', just like t

Re: [PATCH] new applet gethostbyname

2012-07-03 Thread Joshua Judson Rosen
On 2012-07-03 10:58, ra...@gmx.de wrote: So it might be a good idea for Eial to model this new applet on glibc's "getent" command I cannot find any reference to glibc's "getent" command, can you point me to such reference? What about this one? Is it the right one?? http://perkamon.alioth.deb