Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
snf-image
Commits
365b2ed3
Commit
365b2ed3
authored
Jan 29, 2014
by
Nikos Skalkotos
Browse files
Add support for resizing OpenBSD UFS file systems
parent
de34e7aa
Changes
3
Hide whitespace changes
Inline
Side-by-side
snf-image-helper/common.sh
View file @
365b2ed3
...
...
@@ -34,6 +34,8 @@ CHNTPW=chntpw
SGDISK
=
sgdisk
GROWFS_UFS
=
growfs.ufs
DUMPFS_UFS
=
dumpfs.ufs
GROWFS_OPENBSD
=
growfs.openbsd
DUMPFS_OPENBSD
=
dumpfs.openbsd
DATE
=
"date -u"
# Time in UTC
EATMYDATA
=
eatmydata
MOUNT
=
"mount -n"
...
...
snf-image-helper/tasks/20FilesystemResizeUnmounted.in
View file @
365b2ed3
...
...
@@ -36,6 +36,21 @@ if [ ! -b "$SNF_IMAGE_DEV" ]; then
log_error
"Device file:
\`
${
SNF_IMAGE_DEV
}
' is not a block device"
fi
if
[
"
$SNF_IMAGE_PROPERTY_OSFAMILY
"
=
openbsd
]
;
then
part
=
"
${
SNF_IMAGE_DEV
}
$(
@scriptsdir@/disklabel.py
--print-last-linux
"
$SNF_IMAGE_DEV
"
)
"
# If this fails the script will stop
$DUMPFS_OPENBSD
"
$part
"
>
/dev/null
$GROWFS_OPENBSD
-y
"
$part
"
exit
0
fi
if
[
"
$SNF_IMAGE_PROPERTY_OSFAMILY
"
=
netbsd
]
;
then
warn
"File system resizing currently not supported for NetBSD"
exit
0
fi
if
[
-z
"
$SNF_IMAGE_RESIZE_PART
"
]
;
then
warn
"No partition chosen for resize"
exit
0
...
...
@@ -45,12 +60,6 @@ if [ "x$SNF_IMAGE_PROPERTY_DO_SYNC" = "xyes" ]; then
unset
EATMYDATA
fi
if
[[
"
$SNF_IMAGE_PROPERTY_OSFAMILY
"
=
~
(
net
)
|
(
open
)
bsd
]]
;
then
os
=
${
SNF_IMAGE_PROPERTY_OSFAMILY
^^[bsd]
}
warn
"File sytem resizing currently not supported for
${
os
^?
}
"
exit
0
fi
table
=
$(
get_partition_table
"
$SNF_IMAGE_DEV
"
)
partition
=
$(
get_partition_by_num
"
$table
"
"
$SNF_IMAGE_RESIZE_PART
"
)
id
=
$(
cut
-d
:
-f1
<<<
"
$partition
"
)
...
...
snf-image-host/multistrap.conf
View file @
365b2ed3
...
...
@@ -34,7 +34,7 @@ suite=wheezy/
components
=
[
Helper
]
packages
=
ufsutils
linux
-
image
-
3
.
2
.
0
-
4
-
amd64
python
-
bcrypt
packages
=
ufsutils
linux
-
image
-
3
.
2
.
0
-
4
-
amd64
python
-
bcrypt
openbsd
-
utils
# Don't change the parameters below unless you really know what you are doing.
# The /'s and the empty `componets' variable are needed when working with apt.
source
=
http
://
apt
.
dev
.
grnet
.
gr
/
...
...
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