How can I extract an archive before LOGIN (at boot)?


#1

Hi!

How can I extract an archive before LOGIN (at boot)?

I add this to /etc/rc.local:

mkdir /mnt/RAM-tmpfs
mount -t tmpfs -o rw,size=650M tmpfs /mnt/RAM-tmpfs
sleep 6

tar xvzf /home/uSeR1/tmpfs_browser.tar.gz -C /mnt/RAM-tmpfs
sleep 3

exit 0

Whats wrong?
Because, I can see and use after Login '/mnt/RAM-tmpfs'
but there is no folder "tmpfs_browser" inside this tmpfs-partition.

Can someone help please? Thanks!


#2

hmm, rc.local don't extract with the tar command the archive after I login.

The /mnt/RAM-tmpfs exists, but not the extracted folder inside.

When I done it manual, then it works:

mkdir /mnt/RAM-tmpfs
mount -t tmpfs -o rw,size=650M tmpfs /mnt/RAM-tmpfs
chmod 777 /mnt/RAM-tmpfs -R
sleep 4

tar xvzf /home/uSeR1/tmpfs_browser.tar.gz -C /mnt/RAM-tmpfs
sleep 2

chown -R uSeR1:uSeR1 /mnt/RAM-tmpfs/tmpfs_browser
sleep 2

exit 0

Any idea?


#3

Got it now:

I added to: 'mate-session-properties' (Startup/AutoStart)

/RAM-tmpfs/
tar xvzf /opt/RAM-tmpfs.tar.gz -C /mnt/RAM-tmpfs

Now it works.

'done'