aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/diskprep/files
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2005-09-02 07:56:48 +0800
committerbrooks <brooks@FreeBSD.org>2005-09-02 07:56:48 +0800
commit6387b55a605ca2d4dcc9cea4a8d82ffb89f3a198 (patch)
treeebdd5489421970c278e3a19039c8dd0efcadcb59 /sysutils/diskprep/files
parent4c65a40c4db1787c41be7af78fd435e3f576b844 (diff)
downloadfreebsd-ports-gnome-6387b55a605ca2d4dcc9cea4a8d82ffb89f3a198.tar.gz
freebsd-ports-gnome-6387b55a605ca2d4dcc9cea4a8d82ffb89f3a198.tar.zst
freebsd-ports-gnome-6387b55a605ca2d4dcc9cea4a8d82ffb89f3a198.zip
Upgrade to 1.0.0. The primary differences are support for geom and ufs
labels plus a startup script that allows disks to be configured at boot based on the existance of a geom label. This release de-supports FreeBSD < 5.3 due to the geom label support requirment.
Diffstat (limited to 'sysutils/diskprep/files')
-rw-r--r--sysutils/diskprep/files/diskprep.in39
1 files changed, 39 insertions, 0 deletions
diff --git a/sysutils/diskprep/files/diskprep.in b/sysutils/diskprep/files/diskprep.in
new file mode 100644
index 000000000000..8c16c8ef0db4
--- /dev/null
+++ b/sysutils/diskprep/files/diskprep.in
@@ -0,0 +1,39 @@
+#!/bin/sh
+# $Aero: util/diskprep/diskprep.rc,v 1.1 2005/08/06 00:50:59 brooks Exp $
+
+# PROVIDE: diskprep
+# REQUIRE: disks
+# BEFORE: fsck localswap
+# KEYWORD: nojail
+
+rc_debug=YES
+
+. /etc/rc.subr
+
+name="diskprep"
+rc_var=`set_rcvar`
+start_precmd="diskprep_prestart"
+stop_cmd=":"
+command="/usr/local/sbin/diskprep"
+
+diskprep_prestart()
+{
+ if [ -n "${diskprep_label}" ]; then
+ # If our label exists, we're done.
+ if [ -c /dev/label/${curlabel} ]; then
+ return 0
+ fi
+ command_args="$command_args -l $diskprep_label"
+ fi
+ if [ -n "${diskprep_config}" ]; then
+ command_args="$command_args -c $diskprep_config"
+ fi
+ if [ -z "${diskprep_disk}" -o ! -c "/dev/${diskprep_disk}" ]; then
+ err 1 "diskprep enabled, but no disk found!"
+ fi
+ command_args="$command_args $diskprep_disk"
+}
+
+load_rc_config $name
+
+run_rc_command "$1"