<commit_before>#!/bin/bash

USERNAME=${USERNAME:-"mritd"}
PASSWORD=${PASSWORD:-"<PASSWORD>"}
MOUNT_POINT=${MOUNT_POINT-"/data"}
VOL_SIZE_MB=${VOL_SIZE_MB-"512000"}

while getopts "u:p:m:v" OPT; do
    case $OPT in
        u)
            USERNAME=$OPTARG;;
        p)
            PASSWORD=$OPTARG;;
        m)
            MOUNT_POINT=$OPTARG;;
        v)
            VOL_SIZE_MB=$OPTARG;;
    esac
done

cat /etc/passwd | grep $USERNAME >& /dev/null

if [ $? -ne 0 ];then
    echo "Add user: $USERNAME..."
    adduser -S -H -G root $USERNAME
else
    echo "User: $USERNAME already exists!"
fi

mkdir -p $MOUNT_POINT
chown -R $USERNAME:root $MOUNT_POINT<commit_msg>fix(time-machine): 修复无法登陆问题<commit_after>#!/bin/bash

USERNAME=${USERNAME:-"mritd"}
PASSWORD=${PASSWORD:-"<PASSWORD>"}
MOUNT_POINT=${MOUNT_POINT-"/data"}
VOL_SIZE_MB=${VOL_SIZE_MB-"512000"}

while getopts "u:p:m:v" OPT; do
    case $OPT in
        u)
            USERNAME=$OPTARG;;
        p)
            PASSWORD=$OPTARG;;
        m)
            MOUNT_POINT=$OPTARG;;
        v)
            VOL_SIZE_MB=$OPTARG;;
    esac
done

cat /etc/passwd | grep $USERNAME >& /dev/null

if [ $? -ne 0 ];then
    echo "Add user: $USERNAME..."
    adduser -S -H -G root $USERNAME
    echo ${USERNAME}:${PASSWORD} | chpasswd &> /dev/null

else
    echo "User: $USERNAME already exists!"
fi

mkdir -p $MOUNT_POINT
chown -R $USERNAME:root $MOUNT_POINT
{'fraction_non_alphanumeric': 0.15879828326180256, 'fraction_numerical': 0.010014306151645207, 'mean_word_length': 2.6432291666666665, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '1850061', 'n_tokens_mistral': 559, 'n_tokens_neox': 535, 'n_words': 116}