add PS1 incase of bash useage
This commit is contained in:
parent
1abf7f48e2
commit
0842e2d353
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Adapted from LinuxConfig.org
|
# Adapted from LinuxConfig.org
|
||||||
# GNU GPL v3.0+
|
# GNU GPL v3.0+
|
||||||
CMDS="bash mkdir touch mv rm ls grep cat vim"
|
CMDS="bash clear mkdir touch mv rm ls grep cat vim"
|
||||||
|
|
||||||
USER=$1
|
USER=$1
|
||||||
CMDS=($CMDS) # convert to array
|
CMDS=($CMDS) # convert to array
|
||||||
@ -18,6 +18,7 @@ CHROOT=$(eval echo ~$USER)
|
|||||||
|
|
||||||
mkdir -p $CHROOT$CHROOT # make new home dir
|
mkdir -p $CHROOT$CHROOT # make new home dir
|
||||||
chown $USER:$USER $CHROOT$CHROOT
|
chown $USER:$USER $CHROOT$CHROOT
|
||||||
|
echo "PS1='\[\e[38;5;202m\][\[\e[38;5;45m\]\h\[\e[38;5;202m\]:\[\e[38;5;40m\]\W\[\e[38;5;202m\]]\\$ \[\e[0m\]'" > $CHROOT$CHROOT/.bashrc
|
||||||
|
|
||||||
# ChrootDirectory requires these permissions
|
# ChrootDirectory requires these permissions
|
||||||
chown root:root $CHROOT
|
chown root:root $CHROOT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user