You are not logged in.
Pages: 1
I would like to run the following code automatically without me having to do anything:
-------------------------------
sudo unionfs -o cow -o allow_other /media/Media/Vids/Secondary=rw:/media/Media/Vids/Primary=rw /media/Combined
sudo unionfs -o cow -o allow_other /media/Combined=rw:/media/Media/Vids/Local=rw /media/Vids
-----------------------------------
However I keep running into pitfalls
I tried to do a system command file launched with a .service file
the bash file resides at /usr/bin/unionfsscript
---------------------------------------------
#!/bin/sh
unionfs -o cow -o allow_other /media/Media/Vids/Secondary=rw:/media/Media/Vids/Primary=rw /media/Combined
unionfs -o cow -o allow_other /media/Combined=rw:/media/Media/Vids/Local=rw /media/Vids
---------------------------------------------------
which I did a chmod +x afterwards to the file
Then I wrote /etc/systemd/system/unionfsservice.service
[Unit]
Description=Load All Network Drives
[Service]
Type=oneshot
ExecStart=/usr/bin/unionfsscript
[Install]
WantedBy=multi-user.target
----------------------
Afterwhich I ran systemctl enable unionfsservice.service
Then I ran systemctl start unionfsservice.service
-Did nothing
Afterwhich I ran:
--------------
systemctl status unionfsservice.service
----------------------
and got:
--------------------
unionfsservice.service - Load All Network Drives
Loaded: loaded (/etc/systemd/system/unionfsservice.service; enabled)
Active: failed (Result: exit-code) since Sun, 2012-11-18 22:58:51 EST; 9s ago
Process: 1320 ExecStart=/usr/bin/unionfsscript (code=exited, status=1/FAILURE)
CGroup: name=systemd:/system/unionfsservice.service
Nov 18 22:58:51 archlinux-voncloft systemd[1]
Nov 18 22:58:51 archlinux-voncloft unionfsscript[1320]
Nov 18 22:58:51 archlinux-voncloft unionfsscript[1320]
Nov 18 22:58:51 archlinux-voncloft unionfsscript[1320]
Nov 18 22:58:51 archlinux-voncloft unionfsscript[1320]
Nov 18 22:58:51 archlinux-voncloft systemd[1]
Nov 18 22:58:51 archlinux-voncloft systemd[1]
Nov 18 22:58:51 archlinux-voncloft systemd[1]
----------------------
I tried running the /usr/bin file as a startup script.........even tried putting sudo in the file - NOTHING IS WORKING
I tried doing a /etc/fstab with the following
unionfs /media/Combined unionfs dirs=/media/Media/Vids/Primary=rw:/media/Media/Vids/Secondary=rw -o allow_other 0 0
which kind of worked.....it would mount the drive but I couldn't view the contents unless I did sudo /media/Comined in a terminal. and if I put allow_other right after the 2nd unionfs it made no difference, I can't use a -o flag either.
Any ideas I am going crazy over this...I just want to merge the folders together into one folder when the pc boots up
I was able to do so in a rc.local file....but since Arch moved to a forsaken systemd structure (which is a horrible idea in my opinion) that idea has been crushed.
any help please
Offline
Can you confirm that your log is really showing log entries with no content?
Offline
which log would this be?
Offline
Well, with the fstab part. /etc/fstab is run as root, so all the dir's will be owned by root by defualt.
You would need to add like these to the mount options in fstab
uid=1000,gid=100
Like here is my Downloads directory fstab entry that I mount as a tempfs
tmpfs /home/user/Downloads tmpfs rw,nodev,noatime,noexec,nosuid,uid=1000,gid=100,mode=700,size=10G 0 0
Last edited by hunterthomson (2012-11-19 09:45:30)
OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec
Offline
Pages: 1