<commit_before>#!/bin/sh

. /etc/default/rcS

CFGDIR="/etc/default/volatiles"
TMPROOT="/var/tmp"
COREDEF="00_core"

[ "${VERBOSE}" != "no" ] && echo "Populating volatile Filesystems."

create_file() {
	EXEC=" 
	touch \"$1\"; 
	chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1 
	chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" >/dev/tty0 2>&1 " 

	test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache

	[ -e "$1" ] && {
	  [ "${VERBOSE}" != "no" ] && echo "Target already exists. Skipping."
	} || {
	  eval $EXEC &
	}
}

mk_dir() {
	EXEC=" 
	mkdir -p \"$1\"; 
	chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1 
	chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" >/dev/tty0 2>&1 "

	test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache
	
	[ -e "$1" ] && {
	  [ "${VERBOSE}" != "no" ] && echo "Target already exists. Skipping."
	} || {
	  eval $EXEC &
	}
}

link_file() {
	EXEC="test -e \"$2\" -o -L $2 || ln -s \"$1\" \"$2\" >/dev/tty0 2>&1" 

	test "$VOLATILE_ENABLE_CACHE" = yes && echo "	$EXEC" >> /etc/volatile.cache
	
	[ -e "$2" ] && {
	  echo "Cannot create link over existing -${TNAME}-." >&2
	} || {
	  eval $EXEC &
	}
}

check_requirements() {
<commit_msg>initscripts: fix populate-volatile.sh file and directory creation - now chmod gets called do set the correct permissions<commit_after>#!/bin/sh

. /etc/default/rcS

CFGDIR="/etc/default/volatiles"
TMPROOT="/var/tmp"
COREDEF="00_core"

[ "${VERBOSE}" != "no" ] && echo "Populating volatile Filesystems."

create_file() {
	EXEC=" 
	touch \"$1\"; 
	chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1; 
	chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" >/dev/tty0 2>&1 " 

	test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache

	[ -e "$1" ] && {
	  [ "${VERBOSE}" != "no" ] && echo "Target already exists. Skipping."
	} || {
	  eval $EXEC &
	}
}

mk_dir() {
	EXEC=" 
	mkdir -p \"$1\"; 
	chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1; 
	chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" >/dev/tty0 2>&1 "

	test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache
	
	[ -e "$1" ] && {
	  [ "${VERBOSE}" != "no" ] && echo "Target already exists. Skipping."
	} || {
	  eval $EXEC &
	}
}

link_file() {
	EXEC="test -e \"$2\" -o -L $2 || ln -s \"$1\" \"$2\" >/dev/tty0 2>&1" 

	test "$VOLATILE_ENABLE_CACHE" = yes && echo "	$EXEC" >> /etc/volatile.cache
	
	[ -e "$2" ] && {
	  echo "Cannot create link over existing -${TNAME}-." >&2
	} || {
	  eval $EXEC &
	}
}

check_requirements() {

{'fraction_non_alphanumeric': 0.24723115398356557, 'fraction_numerical': 0.025008931761343337, 'mean_word_length': 2.888888888888889, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 37, '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': '5709728', 'n_tokens_mistral': 1202, 'n_tokens_neox': 1135, 'n_words': 293}