[SUGGESTION] Save time if you deleted changes files

Non release banter
aus9

[SUGGESTION] Save time if you deleted changes files

Post#1 by aus9 » 30 Oct 2015, 23:56

Hi

I am not expert but thought I would share the ideas of how to save some time if you choose to delete all contents of your porteus/changes folder or directory. Experts won't need to do this. Lets ignore reasons for wiping it and move on.

I login as guest and want to save some time to re-establish my old settings. These old settings must be saved or backup to your backup folder for the scripts to work.
In other words, you do have to some things like click on preferences for your terminal, text editor, file manager etc and make and save those changes

Then you have to copy various folders to your backup.

Outside your system, I use /mnt/sda3 I have a folder called 1bak meaning backups with various sub-folders including Keep.
at 1bak I have 2 scripts. Because folder 1bak is outside Porteus file system, its always there until hard drive corruption etc.

If you login as root, first script might work, but you are more likely to combine into one script.

contents of my-setup.sh
#!/bin/sh
cd ~
cp -fR /mnt/sda3/1bak/.config ~
cp -fR /mnt/sda3/1bak/Desktop ~
cp -R /mnt/sda3/1bak/firefox ~
ln -s /mnt/sda3/1bak/ bak
ln -s /mnt/sda4/1VIDEO/ video
ln -s /mnt/sda4/1SOUND sound
ln -s /mnt/sda3/porteus/optional/ optional
ln -s /mnt/sda3/porteus/modules/ modules
Because I dont login as root I also have a my-root.sh
#!/bin/sh
if [ -d /mnt/live/memory/images/google-chrome-39.0.2171.65-x86_64-bundle.xzm ] ; then
chmod 4755 /opt/google/chrome/chrome-sandbox
fi
cd /mnt/sda3/1bak/Keep
cp -f rc.local /etc/rc.d/
cp -f shadow /etc/
cp -f mirrors* /etc/usm/
usm -u usm
# ^^ in case you have deleted the module
usm -u all
I have made changes to the 2 Slackware mirror files, to use aussie mirrors
On first reboot from a wiped changes folder my root pw is toor but I have amended it and the shadow file holds my old passwd change.
usm stuff still takes time, but save me typing it all.

These are examples of what I do, make your own changes to suit your set up.

YMMV and I still prefer to do some changes manually.

reboot to see if all changes are effective.
Last edited by aus9 on 01 Nov 2015, 02:53, edited 4 times in total.

Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: [SUGGESTION] Save time if you deleted changes files

Post#2 by Bogomips » 31 Oct 2015, 15:47

@aus9

Would not this be better under General Chat? Don't dig what you are doing. This is in Tutorials, and IMHO there is no clear explanation that I can follow. :Search:
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

aus9

Re: [SUGGESTION] Save time if you deleted changes files

Post#3 by aus9 » 01 Nov 2015, 00:14

Ok understood it needs a bigger explanation.

for now pm sent to mod to move it.

thanks for the feedback

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: [SUGGESTION] Save time if you deleted changes files

Post#4 by francois » 01 Nov 2015, 01:37

Moved to general chat.
Prendre son temps, profiter de celui qui passe.

Post Reply