mirror of
https://github.com/unifi-utilities/unifios-utilities.git
synced 2024-08-30 18:32:21 +00:00
preserve bash history too (#454)
This commit is contained in:
parent
8f582eec68
commit
6d2fb02344
@ -1,7 +1,13 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
mkdir -p /mnt/data/.home
|
mkdir -p /mnt/data/.home
|
||||||
if [ ! -f /mnt/data/.home/.ash_history ]; then
|
|
||||||
cp /root/.ash_history /mnt/data/.home/.ash_history
|
for file in .ash_history .bash_history
|
||||||
|
if [ ! -f /mnt/data/.home/$file ]; then
|
||||||
|
touch /root/$file
|
||||||
|
cp /root/$file /mnt/data/.home/$file
|
||||||
|
chown root:root /mnt/data/.home/$file
|
||||||
|
chmod 0600 /mnt/data/.home/$file
|
||||||
fi
|
fi
|
||||||
ln -sf /mnt/data/.home/.ash_history /root/.ash_history
|
ln -sf /mnt/data/.home/$file /root/$file
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user