<commit_before>#!/bin/sh

# Misc dom0 startup setup

/usr/lib/qubes/fix-dir-perms.sh
xenstore-write /local/domain/0/name dom0
DOM0_MAXMEM=`/usr/sbin/xl info | grep total_memory | awk '{ print $3 }'`
xenstore-write /local/domain/0/memory/static-max $[ $DOM0_MAXMEM * 1024 ]

xl sched-credit -d 0 -w 512
cp /var/lib/qubes/qubes.xml /var/lib/qubes/backup/qubes-$(date +%F-%T).xml

/usr/lib/qubes/cleanup-dispvms

# Hide mounted devices from qubes-block list (at first udev run, only / is mounted)
for dev in `xenstore-list /local/domain/0/qubes-block-devices 2> /dev/null`; do
    ( eval `udevadm info -q property -n $dev|sed -e 's/\([^=]*\)=\(.*\)/export \1="\2"/'`;
    /usr/lib/qubes/udev-block-add-change > /dev/null
    )
done

<commit_msg>Improve block devices detection during system startup<commit_after>#!/bin/sh

# Misc dom0 startup setup

/usr/lib/qubes/fix-dir-perms.sh
xenstore-write /local/domain/0/name dom0
DOM0_MAXMEM=`/usr/sbin/xl info | grep total_memory | awk '{ print $3 }'`
xenstore-write /local/domain/0/memory/static-max $[ $DOM0_MAXMEM * 1024 ]

xl sched-credit -d 0 -w 512
cp /var/lib/qubes/qubes.xml /var/lib/qubes/backup/qubes-$(date +%F-%T).xml

/usr/lib/qubes/cleanup-dispvms

# Hide mounted devices from qubes-block list (at first udev run, only / is mounted)
udevadm trigger --action=change --subsystem-match=block

{'fraction_non_alphanumeric': 0.16517857142857142, 'fraction_numerical': 0.025297619047619048, 'mean_word_length': 3.543918918918919, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '3844319', 'n_tokens_mistral': 560, 'n_tokens_neox': 528, 'n_words': 119}