From ecc812f350280b2c423f292bc272d598dc667f65 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Wed, 13 Mar 2013 02:26:40 +0100 Subject: [PATCH] The Underscores Revolution: filenames Get rid of underscores in filenames, use dashes instead. This is first part of cleanup in filenames. "qubes_rpc" still untouched - will be in separate commit. --- ...{qubes_core.modules => qubes-core.modules} | 0 ...ates.sh => qubes-download-dom0-updates.sh} | 0 ...{qubes_misc.modules => qubes-misc.modules} | 0 ...{qubes_serial_login => qubes-serial-login} | 0 misc/qubes-trigger-sync-appmenus.action | 1 + ...enus.sh => qubes-trigger-sync-appmenus.sh} | 0 misc/qubes_trigger_sync_appmenus.action | 1 - misc/qubes_usb.rules | 10 -- misc/serial.conf | 2 +- ...block_add_change => udev-block-add-change} | 0 misc/{block_cleanup => udev-block-cleanup} | 0 misc/{block_remove => udev-block-remove} | 0 ...bes_block.rules => udev-qubes-block.rules} | 8 +- ...qubes_misc.rules => udev-qubes-misc.rules} | 0 misc/udev-qubes-usb.rules | 10 ++ misc/{usb_add_change => udev-usb-add-change} | 2 +- misc/{usb_remove => udev-usb-remove} | 0 ...qubes_external_ip => 30-qubes-external-ip} | 0 network/{qubes_firewall => qubes-firewall} | 4 +- ...es_fix_nm_conf.sh => qubes-fix-nm-conf.sh} | 0 .../{qubes_netwatcher => qubes-netwatcher} | 2 +- network/qubes-nmhook | 2 + ...etup_dnat_to_ns => qubes-setup-dnat-to-ns} | 2 +- network/qubes_nmhook | 2 - network/{setup_ip => setup-ip} | 8 +- ...network.rules => udev-qubes-network.rules} | 2 +- qubes_rpc/prepare-suspend | 2 +- rpm_spec/core-vm.spec | 129 ++++++++---------- vm-init.d/{qubes_core => qubes-core} | 4 +- .../{qubes_core_appvm => qubes-core-appvm} | 2 +- .../{qubes_core_netvm => qubes-core-netvm} | 6 +- vm-init.d/qubes-firewall | 4 +- vm-init.d/qubes-netwatcher | 4 +- vm-systemd/misc-post.sh | 6 +- vm-systemd/network-proxy-setup.sh | 6 +- vm-systemd/prepare-dvm.sh | 2 +- vm-systemd/qubes-firewall.service | 2 +- vm-systemd/qubes-netwatcher.service | 2 +- vm-systemd/qubes-network.service | 1 - 39 files changed, 110 insertions(+), 116 deletions(-) rename misc/{qubes_core.modules => qubes-core.modules} (100%) rename misc/{qubes_download_dom0_updates.sh => qubes-download-dom0-updates.sh} (100%) rename misc/{qubes_misc.modules => qubes-misc.modules} (100%) rename misc/{qubes_serial_login => qubes-serial-login} (100%) create mode 100644 misc/qubes-trigger-sync-appmenus.action rename misc/{qubes_trigger_sync_appmenus.sh => qubes-trigger-sync-appmenus.sh} (100%) delete mode 100644 misc/qubes_trigger_sync_appmenus.action delete mode 100644 misc/qubes_usb.rules rename misc/{block_add_change => udev-block-add-change} (100%) rename misc/{block_cleanup => udev-block-cleanup} (100%) rename misc/{block_remove => udev-block-remove} (100%) rename misc/{qubes_block.rules => udev-qubes-block.rules} (65%) rename misc/{qubes_misc.rules => udev-qubes-misc.rules} (100%) create mode 100644 misc/udev-qubes-usb.rules rename misc/{usb_add_change => udev-usb-add-change} (99%) rename misc/{usb_remove => udev-usb-remove} (100%) rename network/{30-qubes_external_ip => 30-qubes-external-ip} (100%) rename network/{qubes_firewall => qubes-firewall} (90%) rename network/{qubes_fix_nm_conf.sh => qubes-fix-nm-conf.sh} (100%) rename network/{qubes_netwatcher => qubes-netwatcher} (95%) create mode 100755 network/qubes-nmhook rename network/{qubes_setup_dnat_to_ns => qubes-setup-dnat-to-ns} (95%) delete mode 100755 network/qubes_nmhook rename network/{setup_ip => setup-ip} (79%) rename network/{qubes_network.rules => udev-qubes-network.rules} (79%) rename vm-init.d/{qubes_core => qubes-core} (97%) rename vm-init.d/{qubes_core_appvm => qubes-core-appvm} (98%) rename vm-init.d/{qubes_core_netvm => qubes-core-netvm} (88%) diff --git a/misc/qubes_core.modules b/misc/qubes-core.modules similarity index 100% rename from misc/qubes_core.modules rename to misc/qubes-core.modules diff --git a/misc/qubes_download_dom0_updates.sh b/misc/qubes-download-dom0-updates.sh similarity index 100% rename from misc/qubes_download_dom0_updates.sh rename to misc/qubes-download-dom0-updates.sh diff --git a/misc/qubes_misc.modules b/misc/qubes-misc.modules similarity index 100% rename from misc/qubes_misc.modules rename to misc/qubes-misc.modules diff --git a/misc/qubes_serial_login b/misc/qubes-serial-login similarity index 100% rename from misc/qubes_serial_login rename to misc/qubes-serial-login diff --git a/misc/qubes-trigger-sync-appmenus.action b/misc/qubes-trigger-sync-appmenus.action new file mode 100644 index 0000000..b8d8f88 --- /dev/null +++ b/misc/qubes-trigger-sync-appmenus.action @@ -0,0 +1 @@ +*:any:/usr/lib/qubes/qubes-trigger-sync-appmenus.sh diff --git a/misc/qubes_trigger_sync_appmenus.sh b/misc/qubes-trigger-sync-appmenus.sh similarity index 100% rename from misc/qubes_trigger_sync_appmenus.sh rename to misc/qubes-trigger-sync-appmenus.sh diff --git a/misc/qubes_trigger_sync_appmenus.action b/misc/qubes_trigger_sync_appmenus.action deleted file mode 100644 index ad56a8f..0000000 --- a/misc/qubes_trigger_sync_appmenus.action +++ /dev/null @@ -1 +0,0 @@ -*:any:/usr/lib/qubes/qubes_trigger_sync_appmenus.sh diff --git a/misc/qubes_usb.rules b/misc/qubes_usb.rules deleted file mode 100644 index 5b3c875..0000000 --- a/misc/qubes_usb.rules +++ /dev/null @@ -1,10 +0,0 @@ -# Expose all USB devices (except block) via xenstore - -# Handle only USB devices -SUBSYSTEM!="usb", GOTO="qubes_usb_end" - -ACTION=="add", IMPORT{program}="/usr/lib/qubes/usb_add_change" -ACTION=="change", IMPORT{program}="/usr/lib/qubes/usb_add_change" -ACTION=="remove", RUN+="/usr/lib/qubes/usb_remove" - -LABEL="qubes_usb_end" diff --git a/misc/serial.conf b/misc/serial.conf index 48930a4..48f5f6d 100644 --- a/misc/serial.conf +++ b/misc/serial.conf @@ -18,4 +18,4 @@ stop on runlevel [016] instance $DEV respawn pre-start exec /sbin/securetty $DEV -exec /sbin/agetty -l /sbin/qubes_serial_login /dev/$DEV $SPEED vt100-nav +exec /sbin/agetty -l /sbin/qubes-serial-login /dev/$DEV $SPEED vt100-nav diff --git a/misc/block_add_change b/misc/udev-block-add-change similarity index 100% rename from misc/block_add_change rename to misc/udev-block-add-change diff --git a/misc/block_cleanup b/misc/udev-block-cleanup similarity index 100% rename from misc/block_cleanup rename to misc/udev-block-cleanup diff --git a/misc/block_remove b/misc/udev-block-remove similarity index 100% rename from misc/block_remove rename to misc/udev-block-remove diff --git a/misc/qubes_block.rules b/misc/udev-qubes-block.rules similarity index 65% rename from misc/qubes_block.rules rename to misc/udev-qubes-block.rules index ea8c28d..364f5b2 100644 --- a/misc/qubes_block.rules +++ b/misc/udev-qubes-block.rules @@ -10,11 +10,11 @@ ENV{MAJOR}=="202", GOTO="qubes_block_end" ENV{MAJOR}=="253", GOTO="qubes_block_end" IMPORT{db}="QUBES_EXPOSED" -ACTION=="add", IMPORT{program}="/usr/lib/qubes/block_add_change" -ACTION=="change", IMPORT{program}="/usr/lib/qubes/block_add_change" -ACTION=="remove", RUN+="/usr/lib/qubes/block_remove" +ACTION=="add", IMPORT{program}="/usr/lib/qubes/udev-block-add-change" +ACTION=="change", IMPORT{program}="/usr/lib/qubes/udev-block-add-change" +ACTION=="remove", RUN+="/usr/lib/qubes/udev-block-remove" LABEL="qubes_block_end" # Cleanup disconnected frontend from xenstore -ACTION=="remove", SUBSYSTEM=="block", ENV{MAJOR}=="202", RUN+="/usr/lib/qubes/block_cleanup" +ACTION=="remove", SUBSYSTEM=="block", ENV{MAJOR}=="202", RUN+="/usr/lib/qubes/udev-block-cleanup" diff --git a/misc/qubes_misc.rules b/misc/udev-qubes-misc.rules similarity index 100% rename from misc/qubes_misc.rules rename to misc/udev-qubes-misc.rules diff --git a/misc/udev-qubes-usb.rules b/misc/udev-qubes-usb.rules new file mode 100644 index 0000000..e5e24a0 --- /dev/null +++ b/misc/udev-qubes-usb.rules @@ -0,0 +1,10 @@ +# Expose all USB devices (except block) via xenstore + +# Handle only USB devices +SUBSYSTEM!="usb", GOTO="qubes_usb_end" + +ACTION=="add", IMPORT{program}="/usr/lib/qubes/udev-usb-add-change" +ACTION=="change", IMPORT{program}="/usr/lib/qubes/udev-usb-add-change" +ACTION=="remove", RUN+="/usr/lib/qubes/udev-usb-remove" + +LABEL="qubes_usb_end" diff --git a/misc/usb_add_change b/misc/udev-usb-add-change similarity index 99% rename from misc/usb_add_change rename to misc/udev-usb-add-change index 20691f0..9e93cbe 100755 --- a/misc/usb_add_change +++ b/misc/udev-usb-add-change @@ -8,7 +8,7 @@ ## running in dom0. ## -# FIXME: Ignore USB hubs and other wierd devices (see also in usb_remove). +# FIXME: Ignore USB hubs and other wierd devices (see also in usb-remove). [ "`echo $TYPE | cut -f1 -d/`" = "9" ] && exit 0 [ "$DEVTYPE" != "usb_device" ] && exit 0 diff --git a/misc/usb_remove b/misc/udev-usb-remove similarity index 100% rename from misc/usb_remove rename to misc/udev-usb-remove diff --git a/network/30-qubes_external_ip b/network/30-qubes-external-ip similarity index 100% rename from network/30-qubes_external_ip rename to network/30-qubes-external-ip diff --git a/network/qubes_firewall b/network/qubes-firewall similarity index 90% rename from network/qubes_firewall rename to network/qubes-firewall index 30670b8..376326e 100755 --- a/network/qubes_firewall +++ b/network/qubes-firewall @@ -1,7 +1,7 @@ #!/bin/bash set -e -PIDFILE=/var/run/qubes/qubes_firewall.pid +PIDFILE=/var/run/qubes/qubes-firewall.pid XENSTORE_IPTABLES=qubes_iptables XENSTORE_IPTABLES_HEADER=qubes_iptables_header XENSTORE_ERROR=qubes_iptables_error @@ -49,5 +49,7 @@ while true; do fi # Check if user didn't define some custom rules to be applied as well... + [ -x /rw/config/qubes-firewall-user-script ] && /rw/config/qubes-firewall-user-script + # XXX: Backward compatibility [ -x /rw/config/qubes_firewall_user_script ] && /rw/config/qubes_firewall_user_script done diff --git a/network/qubes_fix_nm_conf.sh b/network/qubes-fix-nm-conf.sh similarity index 100% rename from network/qubes_fix_nm_conf.sh rename to network/qubes-fix-nm-conf.sh diff --git a/network/qubes_netwatcher b/network/qubes-netwatcher similarity index 95% rename from network/qubes_netwatcher rename to network/qubes-netwatcher index 63a2dae..36455c7 100755 --- a/network/qubes_netwatcher +++ b/network/qubes-netwatcher @@ -1,7 +1,7 @@ #!/bin/bash set -e -PIDFILE=/var/run/qubes/qubes_netwatcher.pid +PIDFILE=/var/run/qubes/qubes-netwatcher.pid CURR_NETCFG="" # PIDfile handling diff --git a/network/qubes-nmhook b/network/qubes-nmhook new file mode 100755 index 0000000..f985ec7 --- /dev/null +++ b/network/qubes-nmhook @@ -0,0 +1,2 @@ +#!/bin/sh +/usr/lib/qubes/qubes-setup-dnat-to-ns diff --git a/network/qubes_setup_dnat_to_ns b/network/qubes-setup-dnat-to-ns similarity index 95% rename from network/qubes_setup_dnat_to_ns rename to network/qubes-setup-dnat-to-ns index ef6a6dd..6a30126 100755 --- a/network/qubes_setup_dnat_to_ns +++ b/network/qubes-setup-dnat-to-ns @@ -10,7 +10,7 @@ addrule() fi } export PATH=$PATH:/sbin:/bin -source /var/run/qubes/qubes_ns +source /var/run/qubes/qubes-ns if [ "X"$NS1 = "X" ] ; then exit ; fi iptables -t nat -F PR-QBS FIRSTONE=yes diff --git a/network/qubes_nmhook b/network/qubes_nmhook deleted file mode 100755 index b9028de..0000000 --- a/network/qubes_nmhook +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -/usr/lib/qubes/qubes_setup_dnat_to_ns diff --git a/network/setup_ip b/network/setup-ip similarity index 79% rename from network/setup_ip rename to network/setup-ip index 1627f3e..4c3bb72 100755 --- a/network/setup_ip +++ b/network/setup-ip @@ -18,9 +18,11 @@ if [ x$ip != x ]; then gateway=$(/usr/bin/xenstore-read qubes_netvm_gateway) netmask=$(/usr/bin/xenstore-read qubes_netvm_netmask) secondary_dns=$(/usr/bin/xenstore-read qubes_netvm_secondary_dns) - echo "NS1=$gateway" > /var/run/qubes/qubes_ns - echo "NS2=$secondary_dns" >> /var/run/qubes/qubes_ns - /usr/lib/qubes/qubes_setup_dnat_to_ns + echo "NS1=$gateway" > /var/run/qubes/qubes-ns + echo "NS2=$secondary_dns" >> /var/run/qubes/qubes-ns + /usr/lib/qubes/qubes-setup-dnat-to-ns + [ -x /rw/config/qubes-ip-change-hook ] && /rw/config/qubes-ip-change-hook + # XXX: Backward compatibility [ -x /rw/config/qubes_ip_change_hook ] && /rw/config/qubes_ip_change_hook fi diff --git a/network/qubes_network.rules b/network/udev-qubes-network.rules similarity index 79% rename from network/qubes_network.rules rename to network/udev-qubes-network.rules index 077c841..d51c6c2 100644 --- a/network/qubes_network.rules +++ b/network/udev-qubes-network.rules @@ -1,2 +1,2 @@ -SUBSYSTEMS=="xen", KERNEL=="eth*", ACTION=="add", RUN+="/usr/lib/qubes/setup_ip" +SUBSYSTEMS=="xen", KERNEL=="eth*", ACTION=="add", RUN+="/usr/lib/qubes/setup-ip" diff --git a/qubes_rpc/prepare-suspend b/qubes_rpc/prepare-suspend index 4df1122..d8f40d2 100755 --- a/qubes_rpc/prepare-suspend +++ b/qubes_rpc/prepare-suspend @@ -12,5 +12,5 @@ if [ x"$action" == x"suspend" ]; then modprobe -r uhci_hcd ehci_hcd else modprobe ehci_hcd; modprobe uhci_hcd; - nmcli nm sleep false || { [ -x /bin/systemctl ] && systemctl start NetworkManager.service; } || service qubes_core_netvm start + nmcli nm sleep false || { [ -x /bin/systemctl ] && systemctl start NetworkManager.service; } || service qubes-core-netvm start fi diff --git a/rpm_spec/core-vm.spec b/rpm_spec/core-vm.spec index d8615f1..9c54f10 100644 --- a/rpm_spec/core-vm.spec +++ b/rpm_spec/core-vm.spec @@ -107,7 +107,7 @@ install -m 0644 vm-systemd/ntpd.service $RPM_BUILD_ROOT/usr/lib/qubes/init/ install -D -m 0440 misc/qubes.sudoers $RPM_BUILD_ROOT/etc/sudoers.d/qubes install -D -m 0644 misc/qubes.repo $RPM_BUILD_ROOT/etc/yum.repos.d/qubes.repo install -D -m 0644 misc/serial.conf $RPM_BUILD_ROOT/usr/lib/qubes/serial.conf -install -D misc/qubes_serial_login $RPM_BUILD_ROOT/sbin/qubes_serial_login +install -D misc/qubes-serial-login $RPM_BUILD_ROOT/sbin/qubes-serial-login install -d $RPM_BUILD_ROOT/usr/share/glib-2.0/schemas/ install -m 0644 misc/org.gnome.settings-daemon.plugins.updates.gschema.override $RPM_BUILD_ROOT/usr/share/glib-2.0/schemas/ install -d $RPM_BUILD_ROOT/usr/lib/yum-plugins/ @@ -120,16 +120,16 @@ install -d -m 755 $RPM_BUILD_ROOT/etc/pki/rpm-gpg install -m 644 misc/RPM-GPG-KEY-qubes* $RPM_BUILD_ROOT/etc/pki/rpm-gpg/ install -D misc/xenstore-watch $RPM_BUILD_ROOT/usr/bin/xenstore-watch-qubes install -d $RPM_BUILD_ROOT/etc/udev/rules.d -install -m 0644 misc/qubes_misc.rules $RPM_BUILD_ROOT/etc/udev/rules.d/50-qubes_misc.rules -install -m 0644 misc/qubes_block.rules $RPM_BUILD_ROOT/etc/udev/rules.d/99-qubes_block.rules -install -m 0644 misc/qubes_usb.rules $RPM_BUILD_ROOT/etc/udev/rules.d/99-qubes_usb.rules +install -m 0644 misc/udev-qubes-misc.rules $RPM_BUILD_ROOT/etc/udev/rules.d/50-qubes-misc.rules +install -m 0644 misc/udev-qubes-block.rules $RPM_BUILD_ROOT/etc/udev/rules.d/99-qubes-block.rules +install -m 0644 misc/udev-qubes-usb.rules $RPM_BUILD_ROOT/etc/udev/rules.d/99-qubes-usb.rules install -d $RPM_BUILD_ROOT/usr/lib/qubes/ -install misc/qubes_download_dom0_updates.sh $RPM_BUILD_ROOT/usr/lib/qubes/ -install misc/{block_add_change,block_remove,block_cleanup} $RPM_BUILD_ROOT/usr/lib/qubes/ -install misc/{usb_add_change,usb_remove} $RPM_BUILD_ROOT/usr/lib/qubes/ +install misc/qubes-download-dom0-updates.sh $RPM_BUILD_ROOT/usr/lib/qubes/ +install misc/udev-block-* $RPM_BUILD_ROOT/usr/lib/qubes/ +install misc/udev-usb-* $RPM_BUILD_ROOT/usr/lib/qubes/ install misc/vusb-ctl.py $RPM_BUILD_ROOT/usr/lib/qubes/ -install misc/qubes_trigger_sync_appmenus.sh $RPM_BUILD_ROOT/usr/lib/qubes/ -install -D -m 0644 misc/qubes_trigger_sync_appmenus.action $RPM_BUILD_ROOT/etc/yum/post-actions/qubes_trigger_sync_appmenus.action +install misc/qubes-trigger-sync-appmenus.sh $RPM_BUILD_ROOT/usr/lib/qubes/ +install -D -m 0644 misc/qubes-trigger-sync-appmenus.action $RPM_BUILD_ROOT/etc/yum/post-actions/qubes-trigger-sync-appmenus.action install -D misc/polkit-1-qubes-allow-all.pkla $RPM_BUILD_ROOT/etc/polkit-1/localauthority/50-local.d/qubes-allow-all.pkla install -D misc/polkit-1-qubes-allow-all.rules $RPM_BUILD_ROOT/etc/polkit-1/rules.d/00-qubes-allow-all.rules mkdir -p $RPM_BUILD_ROOT/usr/lib/qubes @@ -141,18 +141,18 @@ else fi install misc/dispvm-prerun.sh $RPM_BUILD_ROOT/usr/lib/qubes/dispvm-prerun.sh -install -D misc/qubes_core.modules $RPM_BUILD_ROOT/etc/sysconfig/modules/qubes_core.modules -install -D misc/qubes_misc.modules $RPM_BUILD_ROOT/etc/sysconfig/modules/qubes_misc.modules +install -D misc/qubes-core.modules $RPM_BUILD_ROOT/etc/sysconfig/modules/qubes-core.modules +install -D misc/qubes-misc.modules $RPM_BUILD_ROOT/etc/sysconfig/modules/qubes-misc.modules -install -m 0644 network/qubes_network.rules $RPM_BUILD_ROOT/etc/udev/rules.d/99-qubes_network.rules -install network/qubes_setup_dnat_to_ns $RPM_BUILD_ROOT/usr/lib/qubes -install network/qubes_fix_nm_conf.sh $RPM_BUILD_ROOT/usr/lib/qubes -install network/setup_ip $RPM_BUILD_ROOT/usr/lib/qubes/ +install -m 0644 network/udev-qubes-network.rules $RPM_BUILD_ROOT/etc/udev/rules.d/99-qubes-network.rules +install network/qubes-setup-dnat-to-ns $RPM_BUILD_ROOT/usr/lib/qubes +install network/qubes-fix-nm-conf.sh $RPM_BUILD_ROOT/usr/lib/qubes +install network/setup-ip $RPM_BUILD_ROOT/usr/lib/qubes/ install network/network-manager-prepare-conf-dir $RPM_BUILD_ROOT/usr/lib/qubes/ install -d $RPM_BUILD_ROOT/etc/dhclient.d -ln -s /usr/lib/qubes/qubes_setup_dnat_to_ns $RPM_BUILD_ROOT/etc/dhclient.d/qubes_setup_dnat_to_ns.sh +ln -s /usr/lib/qubes/qubes-setup-dnat-to-ns $RPM_BUILD_ROOT/etc/dhclient.d/qubes-setup-dnat-to-ns.sh install -d $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d/ -install network/{qubes_nmhook,30-qubes_external_ip} $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d/ +install network/{qubes-nmhook,30-qubes-external-ip} $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d/ install -D network/vif-route-qubes $RPM_BUILD_ROOT/etc/xen/scripts/vif-route-qubes install -m 0400 -D network/iptables $RPM_BUILD_ROOT/etc/sysconfig/iptables install -m 0400 -D network/ip6tables $RPM_BUILD_ROOT/etc/sysconfig/ip6tables @@ -163,8 +163,8 @@ install -d $RPM_BUILD_ROOT/etc/yum.conf.d touch $RPM_BUILD_ROOT/etc/yum.conf.d/qubes-proxy.conf install -d $RPM_BUILD_ROOT/usr/sbin -install network/qubes_firewall $RPM_BUILD_ROOT/usr/sbin/ -install network/qubes_netwatcher $RPM_BUILD_ROOT/usr/sbin/ +install network/qubes-firewall $RPM_BUILD_ROOT/usr/sbin/ +install network/qubes-netwatcher $RPM_BUILD_ROOT/usr/sbin/ install -d $RPM_BUILD_ROOT/usr/bin @@ -256,7 +256,7 @@ echo '[main]' > /etc/NetworkManager/NetworkManager.conf echo 'plugins = keyfile' >> /etc/NetworkManager/NetworkManager.conf echo '[keyfile]' >> /etc/NetworkManager/NetworkManager.conf fi -/usr/lib/qubes/qubes_fix_nm_conf.sh +/usr/lib/qubes/qubes-fix-nm-conf.sh # Remove ip_forward setting from sysctl, so NM will not reset it @@ -309,31 +309,22 @@ do continue fi - if [ $(basename $f) == "xend.rules" ] ; then + if [ $(basename $f) == "50-qubes-misc.rules" ] ; then continue fi - if [ $(basename $f) == "50-qubes_misc.rules" ] ; then + if [ $(basename $f) == "99-qubes-network.rules" ] ; then continue fi - if [ $(basename $f) == "99-qubes_network.rules" ] ; then + if [ $(basename $f) == "99-qubes-block.rules" ] ; then continue fi - if [ $(basename $f) == "99-qubes_block.rules" ] ; then + if [ $(basename $f) == "99-qubes-usb.rules" ] ; then continue fi - if [ $(basename $f) == "99-qubes_usb.rules" ] ; then - continue - fi - - if [ $(basename $f) == "90-hal.rules" ] ; then - continue - fi - - mv $f /var/lib/qubes/removed-udev-scripts/ done mkdir -p /rw @@ -377,11 +368,11 @@ rm -f %{name}-%{version} %dir %attr(0775,user,user) /var/lib/qubes/dom0-updates %{kde_service_dir}/qvm-copy.desktop %{kde_service_dir}/qvm-dvm.desktop -/etc/NetworkManager/dispatcher.d/30-qubes_external_ip -/etc/NetworkManager/dispatcher.d/qubes_nmhook +/etc/NetworkManager/dispatcher.d/30-qubes-external-ip +/etc/NetworkManager/dispatcher.d/qubes-nmhook /etc/X11/xorg-preload-apps.conf /etc/dispvm-dotfiles.tbz -/etc/dhclient.d/qubes_setup_dnat_to_ns.sh +/etc/dhclient.d/qubes-setup-dnat-to-ns.sh /etc/fstab /etc/pki/rpm-gpg/RPM-GPG-KEY-qubes* /etc/polkit-1/localauthority/50-local.d/qubes-allow-all.pkla @@ -398,21 +389,21 @@ rm -f %{name}-%{version} /etc/sudoers.d/qubes %config(noreplace) /etc/sysconfig/iptables %config(noreplace) /etc/sysconfig/ip6tables -/etc/sysconfig/modules/qubes_core.modules -/etc/sysconfig/modules/qubes_misc.modules +/etc/sysconfig/modules/qubes-core.modules +/etc/sysconfig/modules/qubes-misc.modules %config(noreplace) /etc/tinyproxy/filter-qubes-yum %config(noreplace) /etc/tinyproxy/tinyproxy-qubes-yum.conf -/etc/udev/rules.d/50-qubes_misc.rules -/etc/udev/rules.d/99-qubes_block.rules -/etc/udev/rules.d/99-qubes_network.rules -/etc/udev/rules.d/99-qubes_usb.rules +/etc/udev/rules.d/50-qubes-misc.rules +/etc/udev/rules.d/99-qubes-block.rules +/etc/udev/rules.d/99-qubes-network.rules +/etc/udev/rules.d/99-qubes-usb.rules /etc/xdg/nautilus-actions/nautilus-actions.conf /etc/xen/scripts/vif-route-qubes %config(noreplace) /etc/yum.conf.d/qubes-proxy.conf %config(noreplace) /etc/yum.repos.d/qubes.repo /etc/yum/pluginconf.d/yum-qubes-hooks.conf -/etc/yum/post-actions/qubes_trigger_sync_appmenus.action -/sbin/qubes_serial_login +/etc/yum/post-actions/qubes-trigger-sync-appmenus.action +/sbin/qubes-serial-login /usr/bin/qvm-copy-to-vm /usr/bin/qvm-open-in-dvm /usr/bin/qvm-open-in-vm @@ -420,11 +411,11 @@ rm -f %{name}-%{version} /usr/bin/qvm-mru-entry /usr/bin/xenstore-watch-qubes %dir /usr/lib/qubes -/usr/lib/qubes/block_add_change -/usr/lib/qubes/block_cleanup -/usr/lib/qubes/block_remove -/usr/lib/qubes/usb_add_change -/usr/lib/qubes/usb_remove +/usr/lib/qubes/udev-block-add-change +/usr/lib/qubes/udev-block-cleanup +/usr/lib/qubes/udev-block-remove +/usr/lib/qubes/udev-usb-add-change +/usr/lib/qubes/udev-usb-remove /usr/lib/qubes/vusb-ctl.py* /usr/lib/qubes/dispvm-prerun.sh /usr/lib/qubes/sync-ntp-clock @@ -435,19 +426,19 @@ rm -f %{name}-%{version} %attr(4755,root,root) /usr/lib/qubes/qfile-unpacker /usr/lib/qubes/qopen-in-vm /usr/lib/qubes/qrun-in-vm -/usr/lib/qubes/qubes_download_dom0_updates.sh -/usr/lib/qubes/qubes_fix_nm_conf.sh -/usr/lib/qubes/qubes_setup_dnat_to_ns -/usr/lib/qubes/qubes_trigger_sync_appmenus.sh +/usr/lib/qubes/qubes-download-dom0-updates.sh +/usr/lib/qubes/qubes-fix-nm-conf.sh +/usr/lib/qubes/qubes-setup-dnat-to-ns +/usr/lib/qubes/qubes-trigger-sync-appmenus.sh /usr/lib/qubes/qvm-copy-to-vm.gnome /usr/lib/qubes/qvm-copy-to-vm.kde /usr/lib/qubes/serial.conf -/usr/lib/qubes/setup_ip +/usr/lib/qubes/setup-ip /usr/lib/qubes/vm-file-editor /usr/lib/qubes/wrap_in_html_if_url.sh /usr/lib/yum-plugins/yum-qubes-hooks.py* -/usr/sbin/qubes_firewall -/usr/sbin/qubes_netwatcher +/usr/sbin/qubes-firewall +/usr/sbin/qubes-netwatcher /usr/share/glib-2.0/schemas/org.gnome.settings-daemon.plugins.updates.gschema.override /usr/share/file-manager/actions/qvm-copy-gnome.desktop /usr/share/file-manager/actions/qvm-dvm-gnome.desktop @@ -468,9 +459,9 @@ Conflicts: qubes-core-vm-systemd The Qubes core startup configuration for SysV init (or upstart). %files sysvinit -/etc/init.d/qubes_core -/etc/init.d/qubes_core_appvm -/etc/init.d/qubes_core_netvm +/etc/init.d/qubes-core +/etc/init.d/qubes-core-appvm +/etc/init.d/qubes-core-netvm /etc/init.d/qubes-firewall /etc/init.d/qubes-netwatcher /etc/init.d/qubes-yum-proxy @@ -487,7 +478,7 @@ do [ $srv = 'halt' ] && continue [ $srv = 'single' ] && continue [ $srv = 'reboot' ] && continue - [ $srv = 'qubes_gui' ] && continue + [ $srv = 'qubes-gui' ] && continue chkconfig $srv off done @@ -497,12 +488,12 @@ chkconfig haldaemon on chkconfig messagebus on chkconfig iptables on chkconfig ip6tables on -chkconfig --add qubes_core || echo "WARNING: Cannot add service qubes_core!" -chkconfig qubes_core on || echo "WARNING: Cannot enable service qubes_core!" -chkconfig --add qubes_core_netvm || echo "WARNING: Cannot add service qubes_core_netvm!" -chkconfig qubes_core_netvm on || echo "WARNING: Cannot enable service qubes_core_netvm!" -chkconfig --add qubes_core_appvm || echo "WARNING: Cannot add service qubes_core_appvm!" -chkconfig qubes_core_appvm on || echo "WARNING: Cannot enable service qubes_core_appvm!" +chkconfig --add qubes-core || echo "WARNING: Cannot add service qubes-core!" +chkconfig qubes-core on || echo "WARNING: Cannot enable service qubes-core!" +chkconfig --add qubes-core-netvm || echo "WARNING: Cannot add service qubes-core-netvm!" +chkconfig qubes-core-netvm on || echo "WARNING: Cannot enable service qubes-core-netvm!" +chkconfig --add qubes-core-appvm || echo "WARNING: Cannot add service qubes-core-appvm!" +chkconfig qubes-core-appvm on || echo "WARNING: Cannot enable service qubes-core-appvm!" chkconfig --add qubes-firewall || echo "WARNING: Cannot add service qubes-firewall!" chkconfig qubes-firewall on || echo "WARNING: Cannot enable service qubes-firewall!" chkconfig --add qubes-netwatcher || echo "WARNING: Cannot add service qubes-netwatcher!" @@ -516,9 +507,9 @@ sed -i s/^id:.:initdefault:/id:3:initdefault:/ /etc/inittab %preun sysvinit if [ "$1" = 0 ] ; then # no more packages left - chkconfig qubes_core off - chkconfig qubes_core_netvm off - chkconfig qubes_core_appvm off + chkconfig qubes-core off + chkconfig qubes-core-netvm off + chkconfig qubes-core-appvm off chkconfig qubes-firewall off chkconfig qubes-netwatcher off chkconfig qubes-yum-proxy off diff --git a/vm-init.d/qubes_core b/vm-init.d/qubes-core similarity index 97% rename from vm-init.d/qubes_core rename to vm-init.d/qubes-core index 3896736..dd97cb4 100755 --- a/vm-init.d/qubes_core +++ b/vm-init.d/qubes-core @@ -23,7 +23,7 @@ start() mkdir -p /var/run/xen-hotplug name=$(/usr/bin/xenstore-read name) - if ! [ -f /etc/this_is_dvm ] ; then + if ! [ -f /etc/this-is-dvm ] ; then # we don't want to set hostname for DispVM # because it makes some of the pre-created dotfiles invalid (e.g. .kde/cache-) # (let's be frank: nobody's gonna use xterm on DispVM) @@ -50,7 +50,7 @@ start() # DispVM (to override DispVM-template IP) and in case when qubes_ip was # called by udev before loading evtchn kernel module - in which case # xenstore-read fails - INTERFACE=eth0 /usr/lib/qubes/setup_ip + INTERFACE=eth0 /usr/lib/qubes/setup-ip mkdir -p /var/run/qubes diff --git a/vm-init.d/qubes_core_appvm b/vm-init.d/qubes-core-appvm similarity index 98% rename from vm-init.d/qubes_core_appvm rename to vm-init.d/qubes-core-appvm index 6e851d1..58082d9 100755 --- a/vm-init.d/qubes_core_appvm +++ b/vm-init.d/qubes-core-appvm @@ -50,7 +50,7 @@ start() mkdir /home fi mount --bind /home_volatile /home - touch /etc/this_is_dvm + touch /etc/this-is-dvm mount /rw possibly_run_save_script umount /rw diff --git a/vm-init.d/qubes_core_netvm b/vm-init.d/qubes-core-netvm similarity index 88% rename from vm-init.d/qubes_core_netvm rename to vm-init.d/qubes-core-netvm index fa67dc4..c004b74 100755 --- a/vm-init.d/qubes_core_netvm +++ b/vm-init.d/qubes-core-netvm @@ -28,9 +28,9 @@ start() netmask=$(/usr/bin/xenstore-read qubes_netvm_netmask) secondary_dns=$(/usr/bin/xenstore-read qubes_netvm_secondary_dns) modprobe netbk 2> /dev/null || modprobe xen-netback - echo "NS1=$gateway" > /var/run/qubes/qubes_ns - echo "NS2=$secondary_dns" >> /var/run/qubes/qubes_ns - /usr/lib/qubes/qubes_setup_dnat_to_ns + echo "NS1=$gateway" > /var/run/qubes/qubes-ns + echo "NS2=$secondary_dns" >> /var/run/qubes/qubes-ns + /usr/lib/qubes/qubes-setup-dnat-to-ns echo "1" > /proc/sys/net/ipv4/ip_forward fi diff --git a/vm-init.d/qubes-firewall b/vm-init.d/qubes-firewall index 4c76e53..a9a8f51 100755 --- a/vm-init.d/qubes-firewall +++ b/vm-init.d/qubes-firewall @@ -6,7 +6,7 @@ # Source function library. . /etc/rc.d/init.d/functions -PIDFILE=/var/run/qubes/qubes_firewall.pid +PIDFILE=/var/run/qubes/qubes-firewall.pid start() { @@ -15,7 +15,7 @@ start() if [ -z "$start_firewall" ] && [ "$type" == "ProxyVM" ] || [ "$start_firewall" == "1" ]; then echo -n $"Starting Qubes Firewall monitor:" /sbin/ethtool -K eth0 sg off - /usr/sbin/qubes_firewall & + /usr/sbin/qubes-firewall & success echo "" fi diff --git a/vm-init.d/qubes-netwatcher b/vm-init.d/qubes-netwatcher index c60f8a2..95ed9e3 100755 --- a/vm-init.d/qubes-netwatcher +++ b/vm-init.d/qubes-netwatcher @@ -6,7 +6,7 @@ # Source function library. . /etc/rc.d/init.d/functions -PIDFILE=/var/run/qubes/qubes_netwatcher.pid +PIDFILE=/var/run/qubes/qubes-netwatcher.pid start() { @@ -15,7 +15,7 @@ start() if [ -z "$start_netwatcher" ] && [ "$type" == "ProxyVM" ] || [ "$start_netwatcher" == "1" ]; then echo -n $"Starting Qubes Network monitor:" /sbin/ethtool -K eth0 sg off - /usr/sbin/qubes_netwatcher & + /usr/sbin/qubes-netwatcher & success echo "" fi diff --git a/vm-systemd/misc-post.sh b/vm-systemd/misc-post.sh index f1a8f9e..661fb90 100755 --- a/vm-systemd/misc-post.sh +++ b/vm-systemd/misc-post.sh @@ -10,9 +10,9 @@ fi # DispVM (to override DispVM-template IP) and in case when qubes_ip was # called by udev before loading evtchn kernel module - in which case # xenstore-read fails -INTERFACE=eth0 /usr/lib/qubes/setup_ip +INTERFACE=eth0 /usr/lib/qubes/setup-ip -if [ -e /dev/xvdb -a ! -e /etc/this_is_dvm ] ; then +if [ -e /dev/xvdb -a ! -e /etc/this-is-dvm ] ; then mount /rw if ! [ -d /rw/home ] ; then @@ -29,7 +29,7 @@ if [ -e /dev/xvdb -a ! -e /etc/this_is_dvm ] ; then mkdir -p /rw/usrlocal cp -a /usr/local.orig/* /rw/usrlocal - touch /var/lib/qubes/first_boot_completed + touch /var/lib/qubes/first-boot-completed fi # Chown home if user UID have changed - can be the case on template switch HOME_USER_UID=`ls -dn /rw/home/user | awk '{print $3}'` diff --git a/vm-systemd/network-proxy-setup.sh b/vm-systemd/network-proxy-setup.sh index 387e649..8426bd0 100755 --- a/vm-systemd/network-proxy-setup.sh +++ b/vm-systemd/network-proxy-setup.sh @@ -7,9 +7,9 @@ if [ "x$network" != "x" ]; then netmask=$(/usr/bin/xenstore-read qubes_netvm_netmask) secondary_dns=$(/usr/bin/xenstore-read qubes_netvm_secondary_dns) modprobe netbk 2> /dev/null || modprobe xen-netback - echo "NS1=$gateway" > /var/run/qubes/qubes_ns - echo "NS2=$secondary_dns" >> /var/run/qubes/qubes_ns - /usr/lib/qubes/qubes_setup_dnat_to_ns + echo "NS1=$gateway" > /var/run/qubes/qubes-ns + echo "NS2=$secondary_dns" >> /var/run/qubes/qubes-ns + /usr/lib/qubes/qubes-setup-dnat-to-ns echo "1" > /proc/sys/net/ipv4/ip_forward /sbin/ethtool -K eth0 sg off fi diff --git a/vm-systemd/prepare-dvm.sh b/vm-systemd/prepare-dvm.sh index ae57829..a324ca7 100755 --- a/vm-systemd/prepare-dvm.sh +++ b/vm-systemd/prepare-dvm.sh @@ -18,7 +18,7 @@ if xenstore-read qubes_save_request 2>/dev/null ; then mkdir /home fi mount --bind /home_volatile /home - touch /etc/this_is_dvm + touch /etc/this-is-dvm mount /rw possibly_run_save_script umount /rw diff --git a/vm-systemd/qubes-firewall.service b/vm-systemd/qubes-firewall.service index e668271..9229f5b 100644 --- a/vm-systemd/qubes-firewall.service +++ b/vm-systemd/qubes-firewall.service @@ -4,7 +4,7 @@ ConditionPathExists=/var/run/qubes-service/qubes-firewall After=qubes-network.service [Service] -ExecStart=/usr/sbin/qubes_firewall +ExecStart=/usr/sbin/qubes-firewall StandardOutput=syslog [Install] diff --git a/vm-systemd/qubes-netwatcher.service b/vm-systemd/qubes-netwatcher.service index d784ba7..569357a 100644 --- a/vm-systemd/qubes-netwatcher.service +++ b/vm-systemd/qubes-netwatcher.service @@ -4,7 +4,7 @@ ConditionPathExists=/var/run/qubes-service/qubes-netwatcher After=qubes-firewall.service [Service] -ExecStart=/usr/sbin/qubes_netwatcher +ExecStart=/usr/sbin/qubes-netwatcher StandardOutput=syslog [Install] diff --git a/vm-systemd/qubes-network.service b/vm-systemd/qubes-network.service index b82cfa2..6a90a59 100644 --- a/vm-systemd/qubes-network.service +++ b/vm-systemd/qubes-network.service @@ -12,4 +12,3 @@ StandardOutput=syslog [Install] WantedBy=multi-user.target -Alias=qubes_firewall.service