Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
alpine-conf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
18
Issues
18
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
alpine-conf
Commits
4bcfd070
Commit
4bcfd070
authored
Apr 29, 2011
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup-disk: show more info about disk
parent
ca32c5f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
setup-disk.in
setup-disk.in
+6
-3
No files found.
setup-disk.in
View file @
4bcfd070
...
...
@@ -362,10 +362,13 @@ init_progs() {
}
show_disk_info
()
{
local
disk
=
local
disk
=
vendor
=
model
=
d
=
for
disk
in
$@
;
do
# TODO: extend ifo with size, model etc...
echo
"
$disk
"
d
=
${
disk
##*/
}
vendor
=
$(
cat
/sys/block/
$d
/device/vendor 2>/dev/null
)
model
=
$(
cat
/sys/block/
$d
/device/model 2>/dev/null
)
size
=
$(
awk
'{gb = ($1 * 512)/1000000000; printf "%.1f GB\n", gb}'
/sys/block/
$d
/size 2>/dev/null
)
echo
"
$disk
(
$size
$vendor
$model
)"
done
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment