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
e8548716
Commit
e8548716
authored
Oct 24, 2013
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup-disk: add swap to /etc/fstab
parent
c9533d0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
setup-disk.in
setup-disk.in
+5
-0
No files found.
setup-disk.in
View file @
e8548716
...
...
@@ -286,6 +286,10 @@ install_mounted_root() {
mv
"
$mnt
"
/etc/fstab
"
$mnt
"
/etc/fstab.old
fi
enumerate_fstab
"
$mnt
"
>>
"
$mnt
"
/etc/fstab
if
[
-n
"
$SWAP_DEVICE
"
]
;
then
echo
-e
"
${
SWAP_DEVICE
}
\t
swap
\t
swap
\t
defaults
\t
0 0"
\
>>
"
$mnt
"
/etc/fstab
fi
cat
>>
"
$mnt
"
/etc/fstab
<<
EOF
/dev/cdrom /media/cdrom iso9660 noauto,ro 0 0
/dev/fd0 /media/floppy vfat noauto 0 0
...
...
@@ -573,6 +577,7 @@ setup_swap_dev() {
mkswap
$swap_dev
>
/dev/null
echo
-e
"
$swap_dev
\t
swap
\t\t
swap
\t
defaults 0 0"
>>
/etc/fstab
done
SWAP_DEVICE
=
"
$(
uuid_or_device
$swap_dev
)
"
swapon
-a
rc-update
--quiet
add swap boot
}
...
...
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