[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#872577: debootstrap: Handle existing /dev

On Sun, Aug 20, 2017 at 3:25 AM, Ansgar Burchardt <ansgar@debian.org> wrote:
Dan Nicholson writes:
> On Fri, Aug 18, 2017 at 2:48 PM, Henrique de Moraes Holschuh
> <hmh@debian.org> wrote:
>> Wouldn't it be more straigthforward to "test -e || mknod" ?
> I definitely considered that, but it seemed more noisy to the code to
> add a conditional for every call. But I'd be fine reworking to that
> approach if that's more acceptable, though.

You can always introduce a `mknod_if_not_exists` function or so.  Though
I'm not sure this is worth here (the name is so long the `test -e` is
almost shorter).


function mknod-e () {
    [ -e "$1" ] || mknod "$@"

Ben Hildred
Automation Support Services

Reply to: