Pathnames cleanup

Move internal scripts to /usr/lib/qubes plus a couple of similar.
This commit is contained in:
Rafal Wojtczuk 2010-07-16 10:26:55 +02:00 committed by Joanna Rutkowska
parent c518538f59
commit a646ad46b1
9 changed files with 24 additions and 22 deletions

View File

@ -1 +1 @@
SUBSYSTEM=="block", KERNEL=="xvdh", ACTION=="add", RUN+="/usr/bin/qubes_add_pendrive_script" SUBSYSTEM=="block", KERNEL=="xvdh", ACTION=="add", RUN+="/usr/lib/qubes/qubes_add_pendrive_script"

View File

@ -189,7 +189,7 @@ void dvm_transaction_request(char *seq, struct xs_handle *xs)
if (stat_pre.st_mtime == stat_post.st_mtime) if (stat_pre.st_mtime == stat_post.st_mtime)
suicide(xs); suicide(xs);
xs_daemon_close(xs); xs_daemon_close(xs);
execl("/usr/bin/qvm-dvm-transfer", "qvm-dvm-transfer", src_vm, execl("/usr/lib/qubes/qvm-dvm-transfer", "qvm-dvm-transfer", src_vm,
filename, seq, NULL); filename, seq, NULL);
syslog(LOG_DAEMON | LOG_ERR, "execl qvm-dvm-transfer"); syslog(LOG_DAEMON | LOG_ERR, "execl qvm-dvm-transfer");
suicide(xs); suicide(xs);

View File

@ -24,7 +24,7 @@ if [ $# -lt 2 ] ; then
echo usage: $0 'vmname file [file]*' echo usage: $0 'vmname file [file]*'
exit 1 exit 1
fi fi
qubes_penctl new || exit 1 /usr/lib/qubes/qubes_penctl new || exit 1
echo -n Waiting for the Qubes virtual pendrive echo -n Waiting for the Qubes virtual pendrive
while ! [ -e /dev/xvdg ] ; do while ! [ -e /dev/xvdg ] ; do
echo -n . echo -n .
@ -37,4 +37,4 @@ shift
cp -v -a "$@" /mnt/outgoing cp -v -a "$@" /mnt/outgoing
#sometimes Dolphin lags a bit #sometimes Dolphin lags a bit
umount /mnt/outgoing || (sleep 1; umount /mnt/outgoing) || exit 1 umount /mnt/outgoing || (sleep 1; umount /mnt/outgoing) || exit 1
qubes_penctl send $VMNAME || exit 1 /usr/lib/qubes/qubes_penctl send $VMNAME || exit 1

View File

@ -4,7 +4,7 @@ Type=Service
X-KDE-ServiceTypes=KonqPopupMenu/Plugin,inode/directory,all/allfiles X-KDE-ServiceTypes=KonqPopupMenu/Plugin,inode/directory,all/allfiles
[Desktop Action QvmCopy] [Desktop Action QvmCopy]
Exec=/usr/bin/qvm-copy-to-vm.kde %U Exec=/usr/lib/qubes/qvm-copy-to-vm.kde %U
Icon=kget Icon=kget
Name=Send To VM Name=Send To VM

View File

@ -1,2 +1,2 @@
#!/bin/sh #!/bin/sh
/usr/bin/qubes_setup_dnat_to_ns /usr/lib/qubes/qubes_setup_dnat_to_ns

View File

@ -10,7 +10,7 @@ addrule()
fi fi
} }
export PATH=$PATH:/sbin:/bin export PATH=$PATH:/sbin:/bin
source /var/run/qubes_ns source /var/run/qubes/qubes_ns
if [ "X"$NS1 = "X" ] ; then exit ; fi if [ "X"$NS1 = "X" ] ; then exit ; fi
iptables -t nat -F PREROUTING iptables -t nat -F PREROUTING
FIRSTONE=yes FIRSTONE=yes

View File

@ -28,9 +28,9 @@ start()
secondary_dns=$(/usr/bin/xenstore-read qubes_netvm_secondary_dns) secondary_dns=$(/usr/bin/xenstore-read qubes_netvm_secondary_dns)
ifconfig br0 $gateway netmask $netmask up ifconfig br0 $gateway netmask $netmask up
ifconfig br0:1 $secondary_dns netmask $netmask ifconfig br0:1 $secondary_dns netmask $netmask
echo "NS1=$gateway" > /var/run/qubes_ns echo "NS1=$gateway" > /var/run/qubes/qubes_ns
echo "NS2=$secondary_dns" >> /var/run/qubes_ns echo "NS2=$secondary_dns" >> /var/run/qubes/qubes_ns
qubes_setup_dnat_to_ns /usr/lib/qubes/qubes_setup_dnat_to_ns
echo "1" > /proc/sys/net/ipv4/ip_forward echo "1" > /proc/sys/net/ipv4/ip_forward
#now no need for dnsmasq #now no need for dnsmasq
# dnsmasq --listen-address $gateway --bind-interfaces # dnsmasq --listen-address $gateway --bind-interfaces

View File

@ -61,10 +61,10 @@ mkdir -p $RPM_BUILD_ROOT/etc/init.d
cp qubes_core $RPM_BUILD_ROOT/etc/init.d/ cp qubes_core $RPM_BUILD_ROOT/etc/init.d/
mkdir -p $RPM_BUILD_ROOT/var/lib/qubes mkdir -p $RPM_BUILD_ROOT/var/lib/qubes
mkdir -p $RPM_BUILD_ROOT/usr/bin mkdir -p $RPM_BUILD_ROOT/usr/bin
cp qubes_timestamp qubes_add_pendrive_script qubes_penctl \ cp qubes_timestamp qvm-copy-to-vm qvm-open-in-dvm $RPM_BUILD_ROOT/usr/bin
qvm-copy-to-vm qvm-copy-to-vm.kde \ mkdir -p $RPM_BUILD_ROOT/usr/lib/qubes
qvm-open-in-dvm $RPM_BUILD_ROOT/usr/bin cp qubes_add_pendrive_script qubes_penctl qvm-copy-to-vm.kde $RPM_BUILD_ROOT/usr/lib/qubes
ln -s qvm-open-in-dvm $RPM_BUILD_ROOT/usr/bin/qvm-dvm-transfer ln -s /usr/bin/qvm-open-in-dvm $RPM_BUILD_ROOT/usr/lib/qubes/qvm-dvm-transfer
mkdir -p $RPM_BUILD_ROOT/%{kde_service_dir} mkdir -p $RPM_BUILD_ROOT/%{kde_service_dir}
cp qvm-copy.desktop qvm-dvm.desktop $RPM_BUILD_ROOT/%{kde_service_dir} cp qvm-copy.desktop qvm-dvm.desktop $RPM_BUILD_ROOT/%{kde_service_dir}
mkdir -p $RPM_BUILD_ROOT/etc/udev/rules.d mkdir -p $RPM_BUILD_ROOT/etc/udev/rules.d
@ -184,13 +184,13 @@ rm -rf $RPM_BUILD_ROOT
/etc/fstab /etc/fstab
/etc/init.d/qubes_core /etc/init.d/qubes_core
/usr/bin/qvm-copy-to-vm /usr/bin/qvm-copy-to-vm
/usr/bin/qvm-copy-to-vm.kde /usr/lib/qubes/qvm-copy-to-vm.kde
%attr(4755,root,root) /usr/bin/qvm-open-in-dvm %attr(4755,root,root) /usr/bin/qvm-open-in-dvm
/usr/bin/qvm-dvm-transfer /usr/lib/qubes/qvm-dvm-transfer
%{kde_service_dir}/qvm-copy.desktop %{kde_service_dir}/qvm-copy.desktop
%{kde_service_dir}/qvm-dvm.desktop %{kde_service_dir}/qvm-dvm.desktop
%attr(4755,root,root) /usr/bin/qubes_penctl %attr(4755,root,root) /usr/lib/qubes/qubes_penctl
/usr/bin/qubes_add_pendrive_script /usr/lib/qubes/qubes_add_pendrive_script
/etc/udev/rules.d/qubes.rules /etc/udev/rules.d/qubes.rules
/etc/sysconfig/iptables /etc/sysconfig/iptables
/var/lib/qubes /var/lib/qubes

View File

@ -59,10 +59,10 @@ cp fstab $RPM_BUILD_ROOT/etc/fstab
mkdir -p $RPM_BUILD_ROOT/etc/init.d mkdir -p $RPM_BUILD_ROOT/etc/init.d
cp qubes_core $RPM_BUILD_ROOT/etc/init.d/ cp qubes_core $RPM_BUILD_ROOT/etc/init.d/
mkdir -p $RPM_BUILD_ROOT/var/lib/qubes mkdir -p $RPM_BUILD_ROOT/var/lib/qubes
mkdir -p $RPM_BUILD_ROOT/usr/bin mkdir -p $RPM_BUILD_ROOT/usr/lib/qubes
cp ../common/qubes_setup_dnat_to_ns $RPM_BUILD_ROOT/usr/bin cp ../common/qubes_setup_dnat_to_ns $RPM_BUILD_ROOT/usr/lib/qubes
mkdir -p $RPM_BUILD_ROOT/etc/dhclient.d mkdir -p $RPM_BUILD_ROOT/etc/dhclient.d
ln -s /usr/bin/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
mkdir -p $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d/ mkdir -p $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d/
cp ../common/qubes_nmhook $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d/ cp ../common/qubes_nmhook $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d/
mkdir -p $RPM_BUILD_ROOT/etc/yum.repos.d mkdir -p $RPM_BUILD_ROOT/etc/yum.repos.d
@ -71,6 +71,7 @@ mkdir -p $RPM_BUILD_ROOT/sbin
cp ../common/qubes_serial_login $RPM_BUILD_ROOT/sbin cp ../common/qubes_serial_login $RPM_BUILD_ROOT/sbin
mkdir -p $RPM_BUILD_ROOT/etc mkdir -p $RPM_BUILD_ROOT/etc
cp ../common/serial.conf $RPM_BUILD_ROOT/var/lib/qubes/ cp ../common/serial.conf $RPM_BUILD_ROOT/var/lib/qubes/
mkdir -p $RPM_BUILD_ROOT/var/run/qubes
%triggerin -- initscripts %triggerin -- initscripts
cp /var/lib/qubes/serial.conf /etc/init/serial.conf cp /var/lib/qubes/serial.conf /etc/init/serial.conf
@ -168,8 +169,9 @@ rm -rf $RPM_BUILD_ROOT
/etc/sysconfig/iptables /etc/sysconfig/iptables
/etc/init.d/qubes_core /etc/init.d/qubes_core
/var/lib/qubes /var/lib/qubes
/usr/bin/qubes_setup_dnat_to_ns /usr/lib/qubes/qubes_setup_dnat_to_ns
/etc/dhclient.d/qubes_setup_dnat_to_ns.sh /etc/dhclient.d/qubes_setup_dnat_to_ns.sh
/etc/NetworkManager/dispatcher.d/qubes_nmhook /etc/NetworkManager/dispatcher.d/qubes_nmhook
/etc/yum.repos.d/qubes.repo /etc/yum.repos.d/qubes.repo
/sbin/qubes_serial_login /sbin/qubes_serial_login
%dir /var/run/qubes