Opened 21 years ago
Closed 21 years ago
#821 closed defect (fixed)
Creating dirs with install instead of mkdir
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | lowest | Milestone: | |
Component: | Book | Version: | CVS |
Severity: | normal | Keywords: | |
Cc: |
Description
mkdir -p /{root,sbin,tmp,usr/local,var,opt} mkdir -p /var/{tmp,opt,cache,lib/misc,local} chmod 0750 /root chmod 1777 /tmp /var/tmp vs install -d /{sbin,usr/local,var,opt} install -m 0750 -d /root install -m 1777 -d /{tmp,var/tmp}
Change History (12)
comment:1 by , 21 years ago
Status: | new → assigned |
---|
comment:2 by , 21 years ago
Owner: | changed from | to
---|---|
Status: | assigned → new |
comment:3 by , 21 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:4 by , 21 years ago
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
It gets us more educational experience in that another is taught. Also, it helps to shorten the commands a bit. Perhaps some discussion should take place first before closing the bug.
comment:5 by , 21 years ago
Matt had suggested to close it - personally, I kinda like the idea myself
comment:6 by , 21 years ago
Maybe he thought it was for inclusion in the 5.1 book? I agree that it is too late for that now, but not for other books. I'll email him and see what he's thinking.
comment:7 by , 21 years ago
I looked at the archives for April & May and couldn't see any mention of this.
I'm not opposed to this idea (or at least I don't think I am!) but we need to be
careful about maintaining consistency throughout the book. I'd like to see both
mkdir
and install -d
used, but only where there's a particular reason to use
one above the other. The only thing I can think of related to this is when
changing permissions on directories, where install -m 0750 -d /root
would be a
nice alternative to mkdir /root && chmod 0750
. I'm thinking those directories
that we create and don't need permission changes still use mkdir
, all others
use install
. Thoughts?
comment:8 by , 21 years ago
It seems reasonable to me to use install by itself n the creating dirs page so a little snippet of explanatory text could be written saying it is just an alternative (and of course highlight the chmod feature). Then proceed to use mkdir everywhere else. Is there anywhere else in the book where we chmod a dir? Nothing comes to mind, so we could isolate it to one large example in the creating dirs page.
comment:9 by , 21 years ago
Well, there's one example in chapter03/introduction.html, which interestingly
doesn't use the numeric permission modes. I'm not sure whether we need/want to
change this to use install -m 1777 $LFS/sources
?
comment:11 by , 21 years ago
Status: | reopened → new |
---|
Agreed.
Jeremy - you originally had this assigned to you, so it's back with you now :)
Just to confirm: We're changing chapter06/creatingdirs.xml to use `install -d
[-m] instead of
mkdir && chown`. Everything else remains as it is.
Cheers,
Matt.
comment:12 by , 21 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Sorry Jeremy - I beat you to it :)
What's the justification for this? What does it gain us in functionality by using install instead of mkdir -p, other than the ability to set permissions?