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
17
Issues
17
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
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
78c57f4e
Commit
78c57f4e
authored
Jan 12, 2011
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup-disk: generate fstab early. support for verbose (-v)
parent
9208a618
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
12 deletions
+22
-12
setup-disk.in
setup-disk.in
+22
-12
No files found.
setup-disk.in
View file @
78c57f4e
...
...
@@ -168,6 +168,13 @@ install_mounted_root() {
bootdisk
=
"
$bootdisk
/dev/
${
i
}
"
done
fi
if
[
-n
"
$VERBOSE
"
]
;
then
echo
"Root device:
$rootdev
"
echo
"Root filesystem:
$root_fs
"
echo
"Boot device:
$bootdev
"
echo
"Boot filesystem:
$boot_fs
"
echo
"Boot disk(s):
$bootdisk
"
fi
if
[
-z
"
$APKOVL
"
]
;
then
ovlfiles
=
/tmp/ovlfiles
...
...
@@ -176,6 +183,18 @@ install_mounted_root() {
echo
"Restoring backup from
$APKOVL
to
$rootdev
..."
unpack_apkovl
"
$APKOVL
"
"
$mnt
"
||
return
1
fi
# generate the fstab
if
[
-f
"
$mnt
"
/etc/fstab
]
;
then
mv
"
$mnt
"
/etc/fstab
"
$mnt
"
/etc/fstab.old
fi
enumerate_fstab
"
$mnt
"
>>
"
$mnt
"
/etc/fstab
cat
>>
"
$mnt
"
/etc/fstab
<<
EOF
/dev/cdrom /media/cdrom iso9660 noauto,ro 0 0
/dev/fd0 /media/floppy vfat noauto 0 0
/dev/usbdisk /media/usb vfat noauto 0 0
EOF
# remove the installed db in case its there so we force re-install
rm
-f
"
$mnt
"
/var/lib/apk/installed
echon
"Installing system on
$rootdev
: "
...
...
@@ -183,6 +202,7 @@ install_mounted_root() {
mkdir
-p
"
$mnt
"
/etc/apk/keys/
cp
/etc/apk/keys/
*
"
$mnt
"
/etc/apk/keys/
local
apkflags
=
"--quiet --progress --update-cache --clean-protected"
local
pkgs
=
$(
cat
"
$mnt
"
/var/lib/apk/world
)
pkgs
=
"
$pkgs
acct linux-
$KERNEL_FLAVOR
alpine-base"
...
...
@@ -225,17 +245,6 @@ label $KERNEL_FLAVOR
EOF
fi
# generate the fstab
if
[
-f
"
$mnt
"
/etc/fstab
]
;
then
mv
"
$mnt
"
/etc/fstab
"
$mnt
"
/etc/fstab.old
fi
enumerate_fstab
"
$mnt
"
>>
"
$mnt
"
/etc/fstab
cat
>>
"
$mnt
"
/etc/fstab
<<
EOF
/dev/cdrom /media/cdrom iso9660 noauto,ro 0 0
/dev/fd0 /media/floppy vfat noauto 0 0
/dev/usbdisk /media/usb vfat noauto 0 0
EOF
# install extlinux
apk add
-q
syslinux
is_xen
||
extlinux
-i
$raidopt
"
$mnt
"
/boot/
...
...
@@ -462,11 +471,12 @@ case "$(uname -r)" in
esac
# Parse args
while
getopts
"hk:o:r"
opt
;
do
while
getopts
"hk:o:r
v
"
opt
;
do
case
$opt
in
k
)
KERNEL_FLAVOR
=
"
$OPTARG
"
;;
r
)
USE_RAID
=
1
;;
o
)
APKOVL
=
"
$OPTARG
"
;;
v
)
VERBOSE
=
1
;;
*
)
usage
;;
esac
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