<commit_before>#!/usr/bin/env bash
# clearUsageRules.sh - remove iptable rules for removed public interfaces
#
#
# @VERSION@

# if removedVifs file doesn't exist, no rules to be cleared
if [ -f /root/removedVifs ]
then
    var=`cat /root/removedVifs`
    # loop through even vif to be cleared
    for i in $var; do
        # Make sure vif doesn't exist
        if [ ! -f /sys/class/net/$i ]
        then
            # remove rules
            iptables -D NETWORK_STATS -i eth0 -o $i > /dev/null;
            iptables -D NETWORK_STATS -i $i -o eth0 > /dev/null;
        fi
    done
rm /root/removedVifs
fi<commit_msg>Bug 6175: clear rules when pub interface is remove<commit_after>#!/usr/bin/env bash
# clearUsageRules.sh - remove iptable rules for removed public interfaces
#
#
# @VERSION@

# if removedVifs file doesn't exist, no rules to be cleared
if [ -f /root/removedVifs ]
then
    var=`cat /root/removedVifs`
    # loop through even vif to be cleared
    for i in $var; do
        # Make sure vif doesn't exist
        if [ ! -f /sys/class/net/$i ]
        then
            # remove rules
            iptables -D NETWORK_STATS -i eth0 -o $i > /dev/null;
            iptables -D NETWORK_STATS -i $i -o eth0 > /dev/null;
            iptables -D NETWORK_STATS -o $pubIf ! -i eth0 -p tcp > /dev/null;
            iptables -D NETWORK_STATS -i $pubIf ! -o eth0 -p tcp > /dev/null;
        fi
    done
rm /root/removedVifs
fi
{'fraction_non_alphanumeric': 0.10175438596491228, 'fraction_numerical': 0.007017543859649123, 'mean_word_length': 2.066666666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '513554', 'n_tokens_mistral': 503, 'n_tokens_neox': 486, 'n_words': 169}