<commit_before>#!/bin/sh
#
#  mount-ebs.sh
#  Set-up the EBS (Elastic block store) to mount on boot.
#
#  Copyright 2016, <NAME> (https://mbrooks.info)
#  Licensed under the MIT license:
#  http://www.opensource.org/licenses/mit-license.php
#
#  Notes:
#   - This script has been tested to work with FreeBSD & OpenBSD
#   - This script must be run as root
#   - This script can be installed in /etc/rc.d or run from the command-line
#

# PROVIDE: mount_ebs
# REQUIRE: DAEMON netif
# BEFORE:  LOGIN
# KEYWORD: <PASSWORD>

. /etc/rc.subr

name="mount_ebs"
rcvar="${name}_enable"
# mount_ebs is set by rc.conf

start_cmd="${name}_start"

MOUNT_POINT=/mnt/ebs
DEVICE_NAME=/dev/xbd

mount_ebs_start() {
    for device in $(ls $DEVICE_NAME*); do
        num=`echo $device | sed -e 's/^\/dev\/[a-z]*\([0-9]*\)$/\1/g'`
        dir="$MOUNT_POINT${num}"

        if [ ! -d $dir ]; then
            mkdir $dir

            fsck -n -t ufs $device

            if ! mount -t ufs $device $dir; then
                warn "Failed to mount ${device}. Skipping.."<commit_msg>Updated fsck -y argument since snapshots result with unclean filesystem<commit_after>#!/bin/sh
#
#  mount-ebs.sh
#  Set-up the EBS (Elastic block store) to mount on boot.
#
#  Copyright 2016, <NAME> (https://mbrooks.info)
#  Licensed under the MIT license:
#  http://www.opensource.org/licenses/mit-license.php
#
#  Notes:
#   - This script has been tested to work with FreeBSD & OpenBSD
#   - This script must be run as root
#   - This script can be installed in /etc/rc.d or run from the command-line
#

# PROVIDE: mount_ebs
# REQUIRE: DAEMON netif
# BEFORE:  LOGIN
# KEYWORD: <PASSWORD>

. /etc/rc.subr

name="mount_ebs"
rcvar="${name}_enable"
# mount_ebs is set by rc.conf

start_cmd="${name}_start"

MOUNT_POINT=/mnt/ebs
DEVICE_NAME=/dev/xbd

mount_ebs_start() {
    for device in $(ls $DEVICE_NAME*); do
        num=`echo $device | sed -e 's/^\/dev\/[a-z]*\([0-9]*\)$/\1/g'`
        dir="$MOUNT_POINT${num}"

        if [ ! -d $dir ]; then
            mkdir $dir

            fsck -y -t ufs $device

            if ! mount -t ufs $device $dir; then
                warn "Failed to mount ${device}. Skipping.."
{'fraction_non_alphanumeric': 0.1477900552486188, 'fraction_numerical': 0.006445672191528545, 'mean_word_length': 2.6521008403361344, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5790302', 'n_tokens_mistral': 825, 'n_tokens_neox': 791, 'n_words': 226}