logrotate not working in 3.0 [Solved]

Non release banter
User avatar
brokenman
Site Admin
Site Admin
Posts: 5461
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: logrotate not working in 3.0

Post#16 by brokenman » 12 Apr 2014, 21:50

Sorry, I meant to say 'suffix' and not 'prefix'. The command above remains valid. I'll step out now and let this whisky deal go down.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ed_P
Contributor
Contributor
Posts: 3164
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: logrotate not working in 3.0

Post#17 by Ed_P » 13 Apr 2014, 04:31

fanthom wrote:
But you must use RazorQT plus my save.dat file.
save.dat does not count as you could delete half of the system (delete /var/log? - wonderful idea).
My save.dat doesn't delete anything. Not even oversized logs.
once again - have a look on my first post in this topic:
viewtopic.php?f=123&t=3335#p23660
in short - it is a problem with your save.dat so better create new one.
Running logrotate in Always Fresh mode doesn't really accomplish much. The oversized logs are in my changes file. And my changes file is new for 3.0 which I have only been on for what 3 weeks?

The steps I used to create it were:

1. booted RazorQT 3.0 in Always Fresh mode.

2. Created a new save.dat file.

3. Rebooted to changes=EXIT mode

4. Ran this script:

Code: Select all

#!/bin/sh

echo Run from LXterminal else SpaceFM bookmarks won't be restored.
echo Use FireFox to restore FireFox's bookmark backup and edit History 
echo    Preferences and browser.bookmarks.max_backups setting.
echo Use Razor Autosuspend to set Lid Closed to Sleep.
echo Use /usr/lib64/java/jre/bin.jcontrol to adjust Java security.
echo 
echo Be sure to update save.dat name and location.
read

if [ `whoami` != "root" ]; then
  ktsuss "$0"
  exit
fi

mloop  /mnt/sda6/porteussave.dat

#http://forum.porteus.org/viewtopic.php?f=81&t=3075&p=21675#p21675
#cp -r -d /mnt/loop/home/guest/*  2>/dev/null    /home/guest/
cp -r -d /mnt/loop/home/guest/*                  /home/guest/
#http://forum.porteus.org/viewtopic.php?f=81&t=3250&p=23071#p23066
chown guest:guest -R                             /home/guest
cp -r -d /mnt/loop/home/guest/.config/spacefm/*  /home/guest/.config/spacefm/
cp -r -d /mnt/loop/etc/NetworkManager/system-connections/*  /etc/NetworkManager/system-connections
to which at least one command required root privileges.

5. I then reviewed all the fixes I applied under 2.1 and edited out the ones that no longer applied with 3.0 which resulted in this script that I ran.

Code: Select all

#!/bin/sh

if [ `whoami` != "root" ]; then
  ktsuss "$0"
  exit
fi

# disables the Acer's touchpad's jumping
# http://forum.porteus.org/viewtopic.php?f=81&t=1955&start=45#p13596
cp -a /home/guest/syndaemon.desktop  /home/guest/.config/autostart

# No sound - on an Acer 722 netbook
# http://forum.porteus.org/viewtopic.php?f=81&t=2926#p20365
cp -a /home/guest/asound.conf     /etc/
/etc/rc.d/rc.alsa restart

# My purge/compress Syslogs parms - 500 > 300
# http://forum.porteus.org/viewtopic.php?f=81&t=2998&p=21365#p21253
# Copy /etc/logrotate.d/syslog to /home/guest & edit 1st
cp -a /home/guest/syslog          /etc/logrotate.d/

# 3.0 Tool panel height problem.
# http://forum.porteus.org/viewtopic.php?f=81&t=3246&p=23131#p23058
cd /usr/share/icons/Faenza/apps/48/
mv spacefm.png spaceXfm.png

echo B4
synclient | grep Palm
echo  
sh /home/guest/touchpad.sh
echo Aft
synclient | grep Palm
echo 
echo -en "PalmDetect = 1?\n"
read

exit
which once again contained commands that required root privilege.
advice: use root account only when you are 100% sure what you are doing.
I only use it when the commands I attempt to use require it.

So, how do I send you my save.dat file? It's about 60MB zipped.

- update -

Always Fresh mode

Code: Select all

guest@porteus:~$ logrotate 
bash: logrotate: command not found
guest@porteus:~$ su
Password: 
root@porteus:/home/guest# logrotate
logrotate 3.8.6 - Copyright (C) 1995-2001 Red Hat, Inc.
This may be freely redistributed under the terms of the GNU Public License

Usage: logrotate [-dfv?] [-d|--debug] [-f|--force] [-m|--mail=command]
        [-s|--state=statefile] [-v|--verbose] [--version] [-?|--help]
        [--usage] [OPTION...] <configfile>
root@porteus:/home/guest# ls -alh /var/log
total 204K
drwxr-xr-x 30 root root  300 Apr 13 00:59 ./
drwxr-xr-x 30 root root  180 Apr 13 00:59 ../
drwxr-xr-x  2 root root   60 Apr 13 00:59 ConsoleKit/
-rw-r--r--  1 root root  41K Apr 13 00:59 Xorg.0.log
-rw-------  1 root root    0 Nov 14 09:26 btmp
-rw-r-----  1 root root   99 Apr 13 00:59 cron
-rw-r-----  1 root root  20K Apr 13 01:00 debug
-rw-r--r--  1 root root  43K Apr 13 00:59 dmesg
-rw-r--r--  1 root root    0 Feb 14 21:17 faillog
-rw-r--r--  1 root root    0 Apr  8  2000 lastlog
-rw-r-----  1 root root    0 Jun 22  2013 maillog
-rw-r-----  1 root root  56K Apr 13 01:11 messages
drwxr-xr-x  2 root root    3 May 16  2001 nfsd/
drwxr-xr-x  2 root root  120 Mar  5 09:18 packages/
-rw-r--r--  1 root root 1.1K Apr 13 00:59 pm-powersave.log
-rw-r--r--  1 root root  728 Apr 13 00:59 porteus-livedbg
drwxr-xr-x  2 root root    3 Jan  4  2012 removed_packages/
drwxr-xr-x  2 root root    3 Jan  4  2012 removed_scripts/
drwxr-xr-x  2 root root    3 May  3  2012 scripts/
-rw-r-----  1 root root  633 Apr 13 01:22 secure
drwxr-xr-x  4 root root   26 Jan  4  2012 setup/
-rw-r--r--  1 root root   61 Apr 13 00:59 slim.log
-rw-r-----  1 root root    0 Jun 22  2013 spooler
-rw-r-----  1 root root 4.6K Apr 13 01:00 syslog
-rw-r--r--  1 root root  651 Apr 13 01:12 wpa_supplicant.log
-rw-r--r--  1 root root 7.2K Apr 13 00:59 wtmp
root@porteus:/home/guest# logrotate /etc/logrotate.conf
error: /etc/logrotate.conf:31 duplicate log entry for /var/log/wtmp
root@porteus:/home/guest# ls -alh /var/log
total 204K
drwxr-xr-x 30 root root  300 Apr 13 00:59 ./
drwxr-xr-x 30 root root  180 Apr 13 00:59 ../
drwxr-xr-x  2 root root   60 Apr 13 00:59 ConsoleKit/
-rw-r--r--  1 root root  41K Apr 13 00:59 Xorg.0.log
-rw-------  1 root root    0 Nov 14 09:26 btmp
-rw-r-----  1 root root   99 Apr 13 00:59 cron
-rw-r-----  1 root root  20K Apr 13 01:00 debug
-rw-r--r--  1 root root  43K Apr 13 00:59 dmesg
-rw-r--r--  1 root root    0 Feb 14 21:17 faillog
-rw-r--r--  1 root root    0 Apr  8  2000 lastlog
-rw-r-----  1 root root    0 Jun 22  2013 maillog
-rw-r-----  1 root root  56K Apr 13 01:11 messages
drwxr-xr-x  2 root root    3 May 16  2001 nfsd/
drwxr-xr-x  2 root root  120 Mar  5 09:18 packages/
-rw-r--r--  1 root root 1.1K Apr 13 00:59 pm-powersave.log
-rw-r--r--  1 root root  728 Apr 13 00:59 porteus-livedbg
drwxr-xr-x  2 root root    3 Jan  4  2012 removed_packages/
drwxr-xr-x  2 root root    3 Jan  4  2012 removed_scripts/
drwxr-xr-x  2 root root    3 May  3  2012 scripts/
-rw-r-----  1 root root  633 Apr 13 01:22 secure
drwxr-xr-x  4 root root   26 Jan  4  2012 setup/
-rw-r--r--  1 root root   61 Apr 13 00:59 slim.log
-rw-r-----  1 root root    0 Jun 22  2013 spooler
-rw-r-----  1 root root 4.6K Apr 13 01:00 syslog
-rw-r--r--  1 root root  651 Apr 13 01:12 wpa_supplicant.log
-rw-r--r--  1 root root 7.2K Apr 13 00:59 wtmp
root@porteus:/home/guest# 
I don't see where this shows logrotate doing anything. I do see that it is another command that requires root privileges.
Ed

User avatar
fanthom
Site Admin
Site Admin
Posts: 4566
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: logrotate not working in 3.0

Post#18 by fanthom » 13 Apr 2014, 08:08

My save.dat doesn't delete anything.
yes it does. when you delete a file from one of the modules then aufs creates a whiteout file which is stored in your save.dat.
as a trial run 'rm /sbin/cryptsetup' and you'll see /sbin/.wh.cryptsetup appearing in your save.dat. this whiteout file tells aufs to 'hide' /sbin/cryptsetup from appearing in the live filesystem
so if someone is saving changes and run 'rm -r /etc' then porteus wont boot anymore until you remove that '.wh.etc' manually from save.dat or create a new save.dat.
hope it's clear now.
how do I send you my save.dat file?
i'm not interested in your save.dat as per explanation above (you could delete half of the system in it).

regarding Always Fresh - please show me which file is larger than 500K in the data you posted because i think i'm either blind or stupid:

Code: Select all

root@porteus:/home/guest# logrotate /etc/logrotate.conf
error: /etc/logrotate.conf:31 duplicate log entry for /var/log/wtmp
root@porteus:/home/guest# ls -alh /var/log
total 204K
drwxr-xr-x 30 root root  300 Apr 13 00:59 ./
drwxr-xr-x 30 root root  180 Apr 13 00:59 ../
drwxr-xr-x  2 root root   60 Apr 13 00:59 ConsoleKit/
-rw-r--r--  1 root root  41K Apr 13 00:59 Xorg.0.log
-rw-------  1 root root    0 Nov 14 09:26 btmp
-rw-r-----  1 root root   99 Apr 13 00:59 cron
-rw-r-----  1 root root  20K Apr 13 01:00 debug
-rw-r--r--  1 root root  43K Apr 13 00:59 dmesg
-rw-r--r--  1 root root    0 Feb 14 21:17 faillog
-rw-r--r--  1 root root    0 Apr  8  2000 lastlog
-rw-r-----  1 root root    0 Jun 22  2013 maillog
-rw-r-----  1 root root  56K Apr 13 01:11 messages
drwxr-xr-x  2 root root    3 May 16  2001 nfsd/
drwxr-xr-x  2 root root  120 Mar  5 09:18 packages/
-rw-r--r--  1 root root 1.1K Apr 13 00:59 pm-powersave.log
-rw-r--r--  1 root root  728 Apr 13 00:59 porteus-livedbg
drwxr-xr-x  2 root root    3 Jan  4  2012 removed_packages/
drwxr-xr-x  2 root root    3 Jan  4  2012 removed_scripts/
drwxr-xr-x  2 root root    3 May  3  2012 scripts/
-rw-r-----  1 root root  633 Apr 13 01:22 secure
drwxr-xr-x  4 root root   26 Jan  4  2012 setup/
-rw-r--r--  1 root root   61 Apr 13 00:59 slim.log
-rw-r-----  1 root root    0 Jun 22  2013 spooler
-rw-r-----  1 root root 4.6K Apr 13 01:00 syslog
-rw-r--r--  1 root root  651 Apr 13 01:12 wpa_supplicant.log
-rw-r--r--  1 root root 7.2K Apr 13 00:59 wtmp
root@porteus:/home/guest# 
none? well - than maybe everything is ok with me?

let's stop mocking. logrotate is working fine in 3.0.
your bug report is not valid as per changes saved to your save.dat and inability to meet required conditions in 'Always Fresh' (file larger than 500K).
Please add [Solved] to your thread title if the solution was found.

User avatar
Ed_P
Contributor
Contributor
Posts: 3164
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: logrotate not working in 3.0

Post#19 by Ed_P » 14 Apr 2014, 04:52

fanthom wrote:as a trial run 'rm /sbin/cryptsetup' and you'll see /sbin/.wh.cryptsetup appearing in your save.dat. this whiteout file tells aufs to 'hide' /sbin/cryptsetup from appearing in the live filesystem
so if someone is saving changes and run 'rm -r /etc' then porteus wont boot anymore until you remove that '.wh.etc' manually from save.dat or create a new save.dat.
hope it's clear now.
Not really.

Code: Select all

guest@porteus:~$ rm /sbin/cryptsetup
rm: remove write-protected regular file ‘/sbin/cryptsetup’? 
If I reply Y and the file is hidden how will I be able to see a .wh. file in my save.dat file? Image

Code: Select all

guest@porteus:~$ find /mnt/live/ *.wh.*
:
a thousand lines later
:
/mnt/live/bin/eject
/mnt/live/bin/md5sum
/mnt/live/bin/udhcpc
/mnt/live/bin/sort
find: `*.wh.*': No such file or directory
fanthom wrote:regarding Always Fresh - please show me which file is larger than 500K in the data you posted because i think i'm either blind or stupid:
mea culpa mea culpa I am sure you are neither blind or stupid but I may be a bit of both.
brokenman wrote:

Code: Select all

su
toor
## You are now root
cp /path/to/my/file.xzm /var/log/
Or open a root file manager (should be one in your menu) and copy it manually.
Ok, I booted to Always Fresh mode and I copied a file to /var/log/ that is 981.7K using spaceFM to open a root terminal.

Code: Select all

root@porteus:/mnt/sda5# cp wtmp.xzm /var/log
root@porteus:/mnt/sda5# ls -alh /var/log
total 1.2M
drwxr-xr-x 30 root root  320 Apr 14 00:39 ./
drwxr-xr-x 31 root root  200 Apr 14 00:32 ../
drwxr-xr-x  2 root root   60 Apr 13 23:16 ConsoleKit/
-rw-r--r--  1 root root  41K Apr 13 23:16 Xorg.0.log
-rw-------  1 root root    0 Nov 14 09:26 btmp
-rw-r-----  1 root root   99 Apr 13 23:16 cron
-rw-r-----  1 root root  20K Apr 14 00:21 debug
-rw-r--r--  1 root root  43K Apr 13 23:16 dmesg
-rw-r--r--  1 root root    0 Feb 14 21:17 faillog
-rw-r--r--  1 root root    0 Apr  8  2000 lastlog
-rw-r-----  1 root root    0 Jun 22  2013 maillog
-rw-r-----  1 root root  66K Apr 14 00:28 messages
drwxr-xr-x  2 root root    3 May 16  2001 nfsd/
drwxr-xr-x  2 root root  120 Mar  5 09:18 packages/
-rw-r--r--  1 root root 1.1K Apr 13 23:16 pm-powersave.log
-rw-r--r--  1 root root  728 Apr 13 23:15 porteus-livedbg
drwxr-xr-x  2 root root    3 Jan  4  2012 removed_packages/
drwxr-xr-x  2 root root    3 Jan  4  2012 removed_scripts/
drwxr-xr-x  2 root root    3 May  3  2012 scripts/
-rw-r-----  1 root root 1.6K Apr 14 00:38 secure
drwxr-xr-x  4 root root   26 Jan  4  2012 setup/
-rw-r--r--  1 root root   61 Apr 13 23:16 slim.log
-rw-r-----  1 root root    0 Jun 22  2013 spooler
-rw-r-----  1 root root 5.6K Apr 14 00:28 syslog
-rw-r--r--  1 root root 2.3K Apr 14 00:42 wpa_supplicant.log
-rw-r--r--  1 root root 7.2K Apr 13 23:16 wtmp
-rwxr-xr-x  1 root root 982K Apr 14 00:39 wtmp.xzm*
root@porteus:/mnt/sda5# logrotate /etc/logrotate.conf
error: /etc/logrotate.conf:31 duplicate log entry for /var/log/wtmp
root@porteus:/mnt/sda5# ls -alh /var/log
total 1.2M
drwxr-xr-x 30 root root  320 Apr 14 00:39 ./
drwxr-xr-x 31 root root  200 Apr 14 00:32 ../
drwxr-xr-x  2 root root   60 Apr 13 23:16 ConsoleKit/
-rw-r--r--  1 root root  41K Apr 13 23:16 Xorg.0.log
-rw-------  1 root root    0 Nov 14 09:26 btmp
-rw-r-----  1 root root   99 Apr 13 23:16 cron
-rw-r-----  1 root root  20K Apr 14 00:21 debug
-rw-r--r--  1 root root  43K Apr 13 23:16 dmesg
-rw-r--r--  1 root root    0 Feb 14 21:17 faillog
-rw-r--r--  1 root root    0 Apr  8  2000 lastlog
-rw-r-----  1 root root    0 Jun 22  2013 maillog
-rw-r-----  1 root root  66K Apr 14 00:28 messages
drwxr-xr-x  2 root root    3 May 16  2001 nfsd/
drwxr-xr-x  2 root root  120 Mar  5 09:18 packages/
-rw-r--r--  1 root root 1.1K Apr 13 23:16 pm-powersave.log
-rw-r--r--  1 root root  728 Apr 13 23:15 porteus-livedbg
drwxr-xr-x  2 root root    3 Jan  4  2012 removed_packages/
drwxr-xr-x  2 root root    3 Jan  4  2012 removed_scripts/
drwxr-xr-x  2 root root    3 May  3  2012 scripts/
-rw-r-----  1 root root 1.6K Apr 14 00:38 secure
drwxr-xr-x  4 root root   26 Jan  4  2012 setup/
-rw-r--r--  1 root root   61 Apr 13 23:16 slim.log
-rw-r-----  1 root root    0 Jun 22  2013 spooler
-rw-r-----  1 root root 5.6K Apr 14 00:28 syslog
-rw-r--r--  1 root doesn't work.root 2.3K Apr 14 00:42 wpa_supplicant.log
-rw-r--r--  1 root root 7.2K Apr 13 23:16 wtmp
-rwxr-xr-x  1 root root 982K Apr 14 00:39 wtmp.xzm*
Now do you believe me?
Ed

User avatar
fanthom
Site Admin
Site Admin
Posts: 4566
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: logrotate not working in 3.0

Post#20 by fanthom » 14 Apr 2014, 06:08

you are not able to follow simple instructions i provided. here it is: run one by one - no exceptions and modifications:

Code: Select all

root@porteus:~# rm /sbin/cryptsetup 
root@porteus:~# find /mnt/live/ -name ".wh.*" | grep crypt
/mnt/live/memory/changes/sbin/.wh.cryptsetup
root@porteus:~# cp -a /bin/bash /var/log/wtmp 
root@porteus:~# ls -alh /var/log/wtmp 
-rwxr-xr-x 1 root root 951K Mar  7 15:18 /var/log/wtmp*
root@porteus:~# logrotate /etc/logrotate.conf 
error: /etc/logrotate.conf:31 duplicate log entry for /var/log/wtmp
root@porteus:~# ls -alh /var/log/wtmp*
-rwxr-xr-x 1 root root    0 Apr 14 05:59 /var/log/wtmp*
-rwxr-xr-x 1 root root 452K Mar  7 15:18 /var/log/wtmp.1.gz*
root@porteus:~#
Please add [Solved] to your thread title if the solution was found.

User avatar
Ed_P
Contributor
Contributor
Posts: 3164
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: logrotate not working in 3.0

Post#21 by Ed_P » 14 Apr 2014, 06:41

Code: Select all

guest@porteus:~$ su
Password: 
root@porteus:/home/guest# rm /sbin/cryptsetup 
root@porteus:/home/guest# find /mnt/live/ -name ".wh.*" | grep crypt
/mnt/live/memory/changes/sbin/.wh.cryptsetup
root@porteus:/home/guest# cp -a /bin/bash /var/log/wtmp 
root@porteus:/home/guest# ls -alh /var/log/wtmp 
-rwxr-xr-x 1 root root 951K Mar  7 15:18 /var/log/wtmp*
root@porteus:/home/guest# logrotate /etc/logrotate.conf 
root@porteus:/home/guest# ls -alh /var/log/wtmp*
-rwxr-xr-x 1 root root 951K Mar  7 15:18 /var/log/wtmp*
root@porteus:/home/guest# 
Ed

User avatar
fanthom
Site Admin
Site Admin
Posts: 4566
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: logrotate not working in 3.0

Post#22 by fanthom » 14 Apr 2014, 07:32

did you run it in 'Always Fresh' as talked previously?
Please add [Solved] to your thread title if the solution was found.

User avatar
Ed_P
Contributor
Contributor
Posts: 3164
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: logrotate not working in 3.0

Post#23 by Ed_P » 14 Apr 2014, 11:40

fanthom wrote:did you run it in 'Always Fresh' as talked previously?
:o No, and the realization of that woke me out of a sound sleep. Sorry.

Code: Select all

guest@porteus:~$ su
Password: 
root@porteus:/home/guest# rm /sbin/cryptsetup 
root@porteus:/home/guest# find /mnt/live/ -name ".wh.*" | grep crypt
/mnt/live/memory/changes/sbin/.wh.cryptsetup
root@porteus:/home/guest# cp -a /bin/bash /var/log/wtmp 
root@porteus:/home/guest# ls -alh /var/log/wtmp 
-rwxr-xr-x 1 root root 951K Mar  7 15:18 /var/log/wtmp*
root@porteus:/home/guest# logrotate /etc/logrotate.conf 
error: /etc/logrotate.conf:31 duplicate log entry for /var/log/wtmp
root@porteus:/home/guest# ls -alh /var/log/wtmp*
-rwxr-xr-x 1 root root    0 Apr 14 07:33 /var/log/wtmp*
-rwxr-xr-x 1 root root 452K Mar  7 15:18 /var/log/wtmp.1.gz*
root@porteus:/home/guest# 
Ed

User avatar
Ed_P
Contributor
Contributor
Posts: 3164
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: logrotate not working in 3.0

Post#24 by Ed_P » 17 Apr 2014, 00:28

Rebuilt save.dat file.

Always Fresh, Porteus save file manager, then Graphics mode and ran this:

Code: Select all

#!/bin/sh

if [ `whoami` != "root" ]; then
  ktsuss "$0"
  exit
fi

echo
echo Run from LXterminal else SpaceFM bookmarks will not be restored.
echo
echo Be sure to update the save.dat name and location.
read

#http://forum.porteus.org/viewtopic.php?f=81&t=3075&p=21675#p21675
#cp -r -d /mnt/sda5/porteus/Guest/*  2>/dev/null         /home/guest/
cp -r -d /mnt/sda5/porteus/Guest/*                     /home/guest/
#http://forum.porteus.org/viewtopic.php?f=81&t=3250&p=23071#p23066
chown guest:guest -R                                   /home/guest
ls /home/guest/
read

cp -r -d -v /home/guest/Backups/spaceFM/bookmarks      /home/guest/.config/spacefm/

mloop  /mnt/sda5/porteus/changes/porteussave-old.dat
cp -r -d /mnt/loop/etc/NetworkManager/system-connections/* /etc/NetworkManager/system-connections/ 
ls /etc/NetworkManager/system-connections/ 
read

ls /home/guest/.mozilla/firefox/c3pp43bg.default/
cp -r -d -v /mnt/loop/home/guest/.mozilla/firefox/c3pp43bg.default/prefs.js         /home/guest/.mozilla/firefox/
#cp -r -d /mnt/loop/home/guest/.mozilla/firefox/c3pp43bg.default/bookmarkbackups/*  /home/guest/.mozilla/firefox/c3pp43bg.default/bookmarkbackups/
ls /home/guest/.mozilla/firefox/c3pp43bg.default/
read
uloop

echo
echo Use Razor Autosuspend to set Lid Closed to Sleep.
echo Use /usr/lib64/jre1.7.0_51/bin/jcontrol to adjust Java security.
echo
echo Open FireFox to restore FireFox''s bookmark backup, edit History Preferences, 
echo   Edit>Preferences>Privacy>History>Use custom settings for history:
echo    Accept cookies, Accept third-party cookies, Keep until: I close FF, Clear history
echo   and change browser.bookmarks.max_backups setting to 4 (about:config).
echo
echo Recreate the porteussave.dat.xzm file.
echo 

exit
and now this.

Code: Select all

guest@porteus:~$ su
Password: 
root@porteus:/home/guest# find /mnt/live/ -name ".wh.*" | grep .wh.
/mnt/live/memory/changes/home/guest/.cache/mozilla/firefox/c3pp43bg.default/safebrowsing/.wh..wh..opq
/mnt/live/memory/changes/.wh..wh.orph
/mnt/live/memory/changes/.wh..wh.plnk
/mnt/live/memory/changes/.wh..wh.aufs
root@porteus:/home/guest# cp -a /bin/bash /var/log/wtmp
root@porteus:/home/guest# ls -alh /var/log/wtmp 
-rwxr-xr-x 1 root root 951K Mar  7 15:18 /var/log/wtmp*
root@porteus:/home/guest# ./logrotate.sh
total 1.4M
drwxr-xr-x 38 root root  340 Apr 16 20:10 .
drwxr-xr-x 38 root root  160 Apr 16 19:20 ..
drwxr-xr-x  2 root root   60 Apr 16 19:20 ConsoleKit
-rw-r--r--  1 root root  43K Apr 16 20:10 Xorg.0.log
-rw-r--r--  1 root root  42K Apr 16 00:17 Xorg.0.log.old
-rw-------  1 root root    0 Nov 14 09:26 btmp
-rw-r-----  1 root root  617 Apr 16 20:11 cron
-rw-r-----  1 root root  59K Apr 16 20:10 debug
-rw-r--r--  1 root root  44K Apr 16 19:20 dmesg
-rw-r--r--  1 root root    0 Feb 14 21:17 faillog
-rw-r--r--  1 root root    0 Apr  8  2000 lastlog
-rw-r-----  1 root root    0 Jun 22  2013 maillog
-rw-r-----  1 root root 196K Apr 16 20:10 messages
drwxr-xr-x  2 root root    3 May 16  2001 nfsd
drwxr-xr-x  2 root root   48 Jan 16  2013 packages
-rw-r--r--  1 root root 1.1K Apr 16 20:10 pm-powersave.log
-rw-r--r--  1 root root 5.6K Apr 16 20:10 pm-suspend.log
-rw-r--r--  1 root root 1.1K Apr 16 19:20 porteus-livedbg
drwxr-xr-x  2 root root    3 Apr 10 13:40 removed_packages
drwxr-xr-x  2 root root    3 Apr 10 13:40 removed_scripts
drwxr-xr-x  2 root root   48 Jan 16  2013 scripts
-rw-r-----  1 root root 2.9K Apr 16 20:11 secure
drwxr-xr-x  5 root root   26 Apr 10 13:40 setup
-rw-r--r--  1 root root  183 Apr 16 19:20 slim.log
-rw-r-----  1 root root    0 Jun 22  2013 spooler
-rw-r-----  1 root root  18K Apr 16 20:10 syslog
-rw-r--r--  1 root root 3.9K Apr 16 20:10 wpa_supplicant.log
-rwxr-xr-x  1 root root 951K Mar  7 15:18 wtmp

error: /etc/logrotate.conf:31 duplicate log entry for /var/log/wtmp
total 892K
drwxr-xr-x 38 root root  360 Apr 16 20:13 .
drwxr-xr-x 38 root root  160 Apr 16 19:20 ..
drwxr-xr-x  2 root root   60 Apr 16 19:20 ConsoleKit
-rw-r--r--  1 root root  43K Apr 16 20:10 Xorg.0.log
-rw-r--r--  1 root root  42K Apr 16 00:17 Xorg.0.log.old
-rw-------  1 root root    0 Nov 14 09:26 btmp
-rw-r-----  1 root root  617 Apr 16 20:11 cron
-rw-r-----  1 root root  59K Apr 16 20:10 debug
-rw-r--r--  1 root root  44K Apr 16 19:20 dmesg
-rw-r--r--  1 root root    0 Feb 14 21:17 faillog
-rw-r--r--  1 root root    0 Apr  8  2000 lastlog
-rw-r-----  1 root root    0 Jun 22  2013 maillog
-rw-r-----  1 root root 196K Apr 16 20:13 messages
drwxr-xr-x  2 root root    3 May 16  2001 nfsd
drwxr-xr-x  2 root root   48 Jan 16  2013 packages
-rw-r--r--  1 root root 1.1K Apr 16 20:10 pm-powersave.log
-rw-r--r--  1 root root 5.6K Apr 16 20:10 pm-suspend.log
-rw-r--r--  1 root root 1.1K Apr 16 19:20 porteus-livedbg
drwxr-xr-x  2 root root    3 Apr 10 13:40 removed_packages
drwxr-xr-x  2 root root    3 Apr 10 13:40 removed_scripts
drwxr-xr-x  2 root root   48 Jan 16  2013 scripts
-rw-r-----  1 root root 2.9K Apr 16 20:11 secure
drwxr-xr-x  5 root root   26 Apr 10 13:40 setup
-rw-r--r--  1 root root  183 Apr 16 19:20 slim.log
-rw-r-----  1 root root    0 Jun 22  2013 spooler
-rw-r-----  1 root root  18K Apr 16 20:10 syslog
-rw-r--r--  1 root root 3.9K Apr 16 20:10 wpa_supplicant.log
-rwxr-xr-x  1 root root    0 Apr 16 20:13 wtmp
-rwxr-xr-x  1 root root 452K Mar  7 15:18 wtmp.1.gz
So problem appears to be resolved. Could this syslog that I was using have caused the problem??

Code: Select all

/var/log/btmp /var/log/cron /var/log/debug /var/log/maillog /var/log/messages /var/log/secure /var/log/spooler /var/log/syslog /var/log/wtmp {
     rotate 1
     size 300k
     compress
    sharedscripts
    postrotate
   /bin/kill -HUP `cat /var/run/syslogd.pid 2>/dev/null` 2>/dev/null || true
    endscript
}
Ed

User avatar
Ed_P
Contributor
Contributor
Posts: 3164
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: logrotate not working in 3.0 [Solved]

Post#25 by Ed_P » 17 Apr 2014, 15:53

I suspect the problem was caused by my use of this command:

Code: Select all

chown guest:guest -R                                   /home/guest
when restoring my /home/guest/ files which included my tweaked syslog file.
Ed

Post Reply