aboutsummaryrefslogtreecommitdiff
path: root/sysutils/firstboot-growfs
diff options
context:
space:
mode:
authorColin Percival <cperciva@FreeBSD.org>2014-11-23 22:28:49 +0000
committerColin Percival <cperciva@FreeBSD.org>2014-11-23 22:28:49 +0000
commita9aaf14fed5f87b4b930dbf290062be5de679430 (patch)
tree1118b764aa665c2d649eac4f30ed01ca349b10ce /sysutils/firstboot-growfs
parent957631f0d77141075b07d8afa2e624dea56c48fc (diff)
downloadports-a9aaf14fed5f87b4b930dbf290062be5de679430.tar.gz
ports-a9aaf14fed5f87b4b930dbf290062be5de679430.zip
Notes
Diffstat (limited to 'sysutils/firstboot-growfs')
-rw-r--r--sysutils/firstboot-growfs/Makefile26
-rw-r--r--sysutils/firstboot-growfs/files/firstboot_growfs.in58
-rw-r--r--sysutils/firstboot-growfs/pkg-descr4
3 files changed, 0 insertions, 88 deletions
diff --git a/sysutils/firstboot-growfs/Makefile b/sysutils/firstboot-growfs/Makefile
deleted file mode 100644
index c44d72d20409..000000000000
--- a/sysutils/firstboot-growfs/Makefile
+++ /dev/null
@@ -1,26 +0,0 @@
-# $FreeBSD$
-
-PORTNAME= firstboot-growfs
-PORTVERSION= 1.0
-CATEGORIES= sysutils
-MASTER_SITES= # none
-DISTFILES= # none
-
-MAINTAINER= cperciva@FreeBSD.org
-COMMENT= Expand / when the system first boots
-
-NO_WRKSUBDIR= yes
-NO_BUILD= yes
-
-USE_RC_SUBR= firstboot_growfs
-
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} < 902504 || ( ${OSVERSION} >= 1000000 && ${OSVERSION} < 1000100 ) || ( ${OSVERSION} >= 1000500 && ${OSVERSION} < 1000501 ) || (${OSVERSION} >= 1100000 && ${OSVERSION} < 1100001 )
-IGNORE= first boot rc.d scripts not supported on this version of FreeBSD
-.endif
-
-do-fetch do-install:
- @${DO_NADA}
-
-.include <bsd.port.post.mk>
diff --git a/sysutils/firstboot-growfs/files/firstboot_growfs.in b/sysutils/firstboot-growfs/files/firstboot_growfs.in
deleted file mode 100644
index 7e56684cd67f..000000000000
--- a/sysutils/firstboot-growfs/files/firstboot_growfs.in
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/sh
-
-# $FreeBSD$
-# KEYWORD: firstboot
-# PROVIDE: firstboot_growfs
-# REQUIRE: NETWORKING
-# BEFORE: LOGIN
-
-# Add the following lines to /etc/rc.conf.local or /etc/rc.conf (in the disk
-# image, since this only runs on the first boot) to enable this:
-#
-# firstboot_growfs_enable="YES"
-
-. /etc/rc.subr
-
-: ${firstboot_growfs_enable:="NO"}
-: ${firstboot_growfs_fs:="/"}
-
-name="firstboot_growfs"
-rcvar=firstboot_growfs_enable
-start_cmd="firstboot_growfs_run"
-stop_cmd=":"
-
-firstboot_growfs_run()
-{
- local FSTYPE DISK GPTLABEL GPART GDISK GPARTNO
-
- FSTYPE=`mount -p | awk "{ if (\\$2 == \"${firstboot_growfs_fs}\") print \\$3 }"`
- case ${FSTYPE} in
- ufs)
- ;;
- *)
- echo "${firstboot_growfs_fs} is not a UFS volume, cannot resize"
- ;;
- esac
-
- DISK=`mount -p | awk "{ if (\\$2 == \"${firstboot_growfs_fs}\") print \\$1 }"`
- case ${DISK} in
- /dev/gpt/*)
- GPTLABEL=${DISK##/dev/gpt/}
- ;;
- *)
- echo "${firstboot_growfs_fs} is not on a GPT disk, cannot resize"
- return 0
- ;;
- esac
-
- GPART=`glabel status -s | awk "{ if (\\$1 == \"gpt/${GPTLABEL}\") print \\$3 }"`
- GDISK=${GPART%p*}
- GPARTNO=${GPART##*p}
-
- gpart recover ${GDISK}
- gpart resize -i ${GPARTNO} ${GDISK}
- growfs -y ${firstboot_growfs_fs}
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/sysutils/firstboot-growfs/pkg-descr b/sysutils/firstboot-growfs/pkg-descr
deleted file mode 100644
index 1c36bcfe9e0a..000000000000
--- a/sysutils/firstboot-growfs/pkg-descr
+++ /dev/null
@@ -1,4 +0,0 @@
-When the system first boots, resize the (GPT) partition holding the root
-filesystem, then resize the (UFS) root filesystem. This is intended to be
-used in virtual machines where a VM image is built with one size but may
-be launched onto a larger disk.