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
15
Issues
15
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
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
2c30048a
Commit
2c30048a
authored
Nov 02, 2014
by
Kaarle Ritvanen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update-kernel: help on usage
parent
f9650395
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
10 deletions
+34
-10
update-kernel.in
update-kernel.in
+34
-10
No files found.
update-kernel.in
View file @
2c30048a
...
...
@@ -20,8 +20,30 @@ SIGNALS="HUP INT TERM"
TMPDIR
=
features
=
OPTS
=
$(
getopt
-l
build-dir:,flavor:,feature:,package:
-n
$SCRIPT
-o
b:f:F:p:
\
--
"
$@
"
)
error
()
{
echo
"
$SCRIPT
:
$1
"
>
&2
}
usage
()
{
[
"
$2
"
]
&&
error
"
$2
"
local
opts
=
"[-F <feature>]... [-p <package>]..."
cat
>
&2
<<
EOF
Syntax:
$SCRIPT
$opts
[<dest_dir>]
$SCRIPT
-f <flavor>
$opts
<dest_dir>
$SCRIPT
-b <build_dir>
$opts
[<dest_dir>]
Options: -b|--build <build_dir> Install custom-built kernel
-f|--flavor <flavor> Install kernel of specified flavor
-F|--feature <feature> Enable initfs feature
-p|--package <package> Additional module or firmware package
EOF
exit
$1
}
OPTS
=
$(
getopt
-l
build-dir:,flavor:,feature:,help,package:
-n
$SCRIPT
\
-o
b:f:F:hp:
--
"
$@
"
)
||
usage 1
eval set
--
"
$OPTS
"
while
:
;
do
case
"
$1
"
in
...
...
@@ -34,6 +56,9 @@ while :; do
-F
|
--feature
)
features
=
"
$features
$2
"
;;
-h
|
--help
)
usage 0
;;
-p
|
--package
)
PACKAGES
=
"
$PACKAGES
$2
"
;;
...
...
@@ -47,16 +72,12 @@ done
DESTDIR
=
$2
error
()
{
echo
"
$1
"
>
&2
exit
1
}
[
"
$BUILDDIR
"
-a
"
$FLAVOR
"
]
&&
\
error
"Cannot specify both build directory and flavor"
usage 1
"Cannot specify both build directory and flavor"
if
[
-z
"
$DESTDIR
"
]
;
then
[
"
$FLAVOR
"
]
&&
error
"Cannot specify flavor when updating the current kernel"
[
"
$FLAVOR
"
]
&&
\
usage 1
"Cannot specify flavor when updating the current kernel"
while
read
MOUNT
;
do
set
--
$MOUNT
...
...
@@ -66,7 +87,10 @@ if [ -z "$DESTDIR" ]; then
break
done
< /proc/mounts
[
"
$MNTDIR
"
]
||
error
"Module loopback device not mounted"
if
[
-z
"
$MNTDIR
"
]
;
then
error
"Module loopback device not mounted"
exit
1
fi
fi
remount
()
{
...
...
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