Page 1 of 2
Re: Mirrored ~/.config ?
Posted: 03 Sep 2015, 03:56
by brokenman
It should work. It is probably permissions if you are copying as root.
Code: Select all
mkdir -p /mnt/sdxY/rootcopy/home/guest/
cp -a --parents /root/.config/* /mnt/sdxY/rootcopy/home/guest/.config/
## Just to be sure
chown -R guest:guest /mnt/sdxY/rootcopy/home/guest
Re: Mirrored ~/.config ?
Posted: 03 Sep 2015, 11:41
by Bogomips
Maybe in the
porteus/rootcopy/etc/rc.d/rc.local script inserting:
Code: Select all
cp -a /mnt/sd**/porteus/rootcopy/root/.config /home/guest/.config
chown -R guest:guest /home/guest/.config
could work?
Re: Mirrored ~/.config ?
Posted: 03 Sep 2015, 12:20
by Bogomips
Corrected previous post. Did not take into account .config being directory.
First try suggestion without wildcard. See if it works.
Re: Mirrored ~/.config ?
Posted: 03 Sep 2015, 19:11
by Bogomips
After a bit of experimentation with
cp -a, maybe this could work:
Code: Select all
rm -rf --one-file-system /home/guest/.config
cp -a /mnt/sd**/porteus/rootcopy/root/.config /home/guest
chown -R guest:guest /home/guest/.config
Re: Mirrored ~/.config ?
Posted: 03 Sep 2015, 20:36
by Bogomips
^ This is not very clear. You should have got something if the above code was in rc.local script of rootcopy folder.
- The .config in /home/guest should have been deleted
- So, is .config different from /mnt/sd**/porteus/rootcopy/root/.config?
Re: Mirrored ~/.config ?
Posted: 03 Sep 2015, 22:01
by Bogomips
In the start up screen you should have seen if .config was being deleted, unless it whizzes past you too fast. Then the next thing to investigate is to see what is in .config, and whether it is different from the /sd../../root/.config. Can you not see the contents of .config?
Re: Mirrored ~/.config ?
Posted: 03 Sep 2015, 23:42
by Bogomips
So, ok, after rootcopy has been processed on startup, open a terminal and post the output of command, if not too long:
Code: Select all
diff -qr .config /mnt/sdb2/porteus/1508290631/rootcopy/root/.config
Re: Mirrored ~/.config ?
Posted: 04 Sep 2015, 01:06
by Bogomips
OK then,
- make
Code: Select all
#!/bin/bash
rm -rf --one-file-system /home/guest/.config
cp -a /mnt/sdb2/porteus/1508290631/rootcopy/root/.config /home/guest
chown -R guest:guest /home/guest/.config
into script, say blue.sh.
- Then
- Boot parameter (cheatcode) cliexec=/home/guest/blue.sh
- Compare as before
Re: Mirrored ~/.config ?
Posted: 04 Sep 2015, 11:26
by Bogomips
Log in as root, and then compare:
Code: Select all
diff -qr /home/guest/.config /mnt/sdb2/porteus/1508290631/rootcopy/root/.config
Re: Mirrored ~/.config ?
Posted: 04 Sep 2015, 14:22
by Bogomips
Seems to be getting a bit closer. Next try,
- after doing comparison:
- Lastly instead of cliexec, use: guiexec=/home/guest/blue.sh
Re: Mirrored ~/.config ?
Posted: 04 Sep 2015, 17:04
by tome
Why
Code: Select all
rm -rf --one-file-system /home/guest/.config
- it will delete all, even files that will not be copied from rootcopy so at this stage you can probably use
Another choice is to copy and point (symlink) guest/.config and root/.config to non posix filesystem, but it is not possible to share some configurable files (eg geany). Rootcopy is not universal - you can not overwrite directories with symlinks.
Re: Mirrored ~/.config ?
Posted: 04 Sep 2015, 21:18
by Bogomips
tome wrote:Why
Code: Select all
rm -rf --one-file-system /home/guest/.config
- it will delete all, even files that will not be copied from rootcopy so at this stage you can probably use
Because .config exists and is a directory:
Code: Select all
guest@porteus:~$ diff -qr apak tst/apak
Only in apak: cld
guest@porteus:~$ cp -a tst/apak /home/guest
guest@porteus:~$ diff -qr apak tst/apak
Only in apak: cld
blue4meridian wrote:
Why run level 4 (init)?.
Same result?
Good.
Starts X.
Re: Mirrored ~/.config ?
Posted: 05 Sep 2015, 12:54
by Bogomips
blue4meridian wrote:Still booting to login... although I'm very anxious to see the end result.
I first encountered "changes" like approaches over 10 yrs ago (eg. DSL/cowloop).
Even then I felt default parameter "overwrite" was more pragmatic than "save".
Getting insufficient feedback to be of any meaningful help.
- Do you normaly have to log in?
blue4meridian wrote:Still booting to login
Where? In console (init3) or in X?- Did you try tome's suggestion? Along the lines of
Code: Select all
cp -a /mnt/sdb2/porteus/1508290631/rootcopy/root/.config /home/guest
chown -R guest:guest /home/guest/.config
in /etc/rc.d/rc.local - If you were in a console did you login as root and do init 4?
- Did you try booting with guiexec=/home/guest/blue.sh?
Re: Mirrored ~/.config ?
Posted: 05 Sep 2015, 15:05
by Bogomips
Have you tried booting with guiexec=/home/guest/mirror.sh, and then logging in as guest?
Re: Mirrored ~/.config ?
Posted: 05 Sep 2015, 18:30
by Bogomips
Any better if we remove first statement from
mirror.sh script, and just have:
Code: Select all
#!/bin/bash
cp -a /mnt/sdb2/porteus/1508290631/rootcopy/root/.config /home/guest
chown -R guest:guest /home/guest/.config
?