Merge branch 'hvm' of 10.141.1.101:/var/lib/qubes/git/marmarek/core into hvm
This commit is contained in:
commit
e200c583df
@ -55,8 +55,12 @@ start()
|
|||||||
|
|
||||||
/usr/lib/qubes/block_cleaner_daemon.py > /var/log/qubes/block_cleaner.log 2>&1 &
|
/usr/lib/qubes/block_cleaner_daemon.py > /var/log/qubes/block_cleaner.log 2>&1 &
|
||||||
|
|
||||||
# Reply block events to hide mounted devices from qubes-block list (at first udev run, only / is mounted)
|
# Hide mounted devices from qubes-block list (at first udev run, only / is mounted)
|
||||||
udevadm trigger --subsystem-match=block --action=add
|
for dev in `xenstore-list /local/domain/0/qubes-block-devices`; do
|
||||||
|
( eval `udevadm info -q property -n $dev|sed -e 's/\([^=]*\)=\(.*\)/export \1="\2"/'`;
|
||||||
|
/usr/lib/qubes/block_add_change
|
||||||
|
)
|
||||||
|
done
|
||||||
|
|
||||||
touch /var/lock/subsys/qubes_core
|
touch /var/lock/subsys/qubes_core
|
||||||
success
|
success
|
||||||
|
@ -880,18 +880,24 @@ class QubesVm(object):
|
|||||||
# If dynamic memory management disabled, set maxmem=mem
|
# If dynamic memory management disabled, set maxmem=mem
|
||||||
args['maxmem'] = args['mem']
|
args['maxmem'] = args['mem']
|
||||||
args['vcpus'] = str(self.vcpus)
|
args['vcpus'] = str(self.vcpus)
|
||||||
args['ip'] = self.ip
|
|
||||||
args['mac'] = self.mac
|
|
||||||
args['gateway'] = self.gateway
|
|
||||||
args['dns1'] = self.gateway
|
|
||||||
args['dns2'] = self.secondary_dns
|
|
||||||
args['netmask'] = self.netmask
|
|
||||||
if self.netvm is not None:
|
if self.netvm is not None:
|
||||||
|
args['ip'] = self.ip
|
||||||
|
args['mac'] = self.mac
|
||||||
|
args['gateway'] = self.netvm.gateway
|
||||||
|
args['dns1'] = self.netvm.gateway
|
||||||
|
args['dns2'] = self.secondary_dns
|
||||||
|
args['netmask'] = self.netmask
|
||||||
args['netdev'] = "'mac={mac},script=/etc/xen/scripts/vif-route-qubes,ip={ip}".format(ip=self.ip, mac=self.mac)
|
args['netdev'] = "'mac={mac},script=/etc/xen/scripts/vif-route-qubes,ip={ip}".format(ip=self.ip, mac=self.mac)
|
||||||
if self.netvm.qid != 0:
|
if self.netvm.qid != 0:
|
||||||
args['netdev'] += ",backend={0}".format(self.netvm.name)
|
args['netdev'] += ",backend={0}".format(self.netvm.name)
|
||||||
args['netdev'] += "'"
|
args['netdev'] += "'"
|
||||||
else:
|
else:
|
||||||
|
args['ip'] = ''
|
||||||
|
args['mac'] = ''
|
||||||
|
args['gateway'] = ''
|
||||||
|
args['dns1'] = ''
|
||||||
|
args['dns2'] = ''
|
||||||
|
args['netmask'] = ''
|
||||||
args['netdev'] = ''
|
args['netdev'] = ''
|
||||||
args['rootdev'] = self.get_rootdev(source_template=source_template)
|
args['rootdev'] = self.get_rootdev(source_template=source_template)
|
||||||
args['privatedev'] = "'script:file:{dir}/private.img,xvdb,w',".format(dir=self.dir_path)
|
args['privatedev'] = "'script:file:{dir}/private.img,xvdb,w',".format(dir=self.dir_path)
|
||||||
|
@ -43,6 +43,10 @@ fi
|
|||||||
mkdir -p $DOM0_UPDATES_DIR/etc
|
mkdir -p $DOM0_UPDATES_DIR/etc
|
||||||
sed -i '/^reposdir\s*=/d' $DOM0_UPDATES_DIR/etc/yum.conf
|
sed -i '/^reposdir\s*=/d' $DOM0_UPDATES_DIR/etc/yum.conf
|
||||||
|
|
||||||
|
# Rebuild rpm database in case of different rpm version
|
||||||
|
rm -f $DOM0_UPDATES_DIR/var/lib/rpm/__*
|
||||||
|
rpm --root=$DOM0_UPDATES_DIR --rebuilddb
|
||||||
|
|
||||||
if [ "$CLEAN" = "1" ]; then
|
if [ "$CLEAN" = "1" ]; then
|
||||||
yum $OPTS clean all
|
yum $OPTS clean all
|
||||||
rm -f $DOM0_UPDATES_DIR/packages/*
|
rm -f $DOM0_UPDATES_DIR/packages/*
|
||||||
|
@ -30,6 +30,11 @@ if [ -e /dev/xvdb ] ; then
|
|||||||
|
|
||||||
touch /var/lib/qubes/first_boot_completed
|
touch /var/lib/qubes/first_boot_completed
|
||||||
fi
|
fi
|
||||||
|
# Chown home if user UID have changed - can be the case on template switch
|
||||||
|
HOME_USER_UID=`ls -dn /home/user | awk '{print $3}'`
|
||||||
|
if [ "`id -u user`" -ne "$HOME_USER_UID" ]; then
|
||||||
|
find /home/user -uid "$HOME_USER_UID" -print0 | xargs -0 chown user:user
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -x /rw/config/rc.local ] && /rw/config/rc.local
|
[ -x /rw/config/rc.local ] && /rw/config/rc.local
|
||||||
|
Loading…
Reference in New Issue
Block a user