I added this `seq` command to make it easier to see output from `factory-reset` on the serial console. It's no longer necessary.
12 lines
249 B
Bash
Executable File
12 lines
249 B
Bash
Executable File
#!/bin/sh
|
|
# vim: set sw=4 ts=4 sts=4 et :
|
|
|
|
DATAPART=$(awk '$2=="/var"{print $1}' /etc/fstab)
|
|
|
|
dev=$(findfs "${DATAPART}")
|
|
if [ -z "${dev}" ]; then
|
|
printf 'Could not find data partition (%s)\n' "${DATAPART}" >&2
|
|
exit 1
|
|
fi
|
|
wipefs -fa "${dev}"
|