mirror of
https://github.com/armbian/build.git
synced 2026-01-06 09:58:46 -08:00
Set window title for remote SSH sessions if possible
This commit is contained in:
@@ -29,6 +29,10 @@ END
|
||||
cp $SRC/lib/scripts/50unattended-upgrades $DEST/cache/sdcard/etc/apt/apt.conf.d/50unattended-upgrades
|
||||
cp $SRC/lib/scripts/02periodic $DEST/cache/sdcard/etc/apt/apt.conf.d/02periodic
|
||||
|
||||
# setting window title for remote sessions
|
||||
mkdir -p $DEST/cache/sdcard/etc/profile.d
|
||||
install -m 755 $SRC/lib/scripts/ssh-title.sh $DEST/cache/sdcard/etc/profile.d/ssh-title.sh
|
||||
|
||||
case $RELEASE in
|
||||
|
||||
# Debian Wheezy
|
||||
@@ -189,5 +193,5 @@ chroot $DEST/cache/sdcard /bin/bash -c "apt-get -y -qq remove hostapd >/dev/null
|
||||
# install sunxi-tools
|
||||
cp $SRC/lib/bin/sunxi-tools_1.3-1_armhf.deb $DEST/cache/sdcard/tmp/
|
||||
# libusb dependency should already be satisfied by usbutils
|
||||
chroot $DEST/cache/sdcard /bin/bash -c "dpkg -i /tmp/sunxi-tools_1.3-1_armhf.deb"
|
||||
chroot $DEST/cache/sdcard /bin/bash -c "dpkg -i /tmp/sunxi-tools_1.3-1_armhf.deb >/dev/null 2>&1"
|
||||
}
|
||||
|
||||
6
scripts/ssh-title.sh
Normal file
6
scripts/ssh-title.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
if [ -n "$PS1" ] && ( [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ] ); then
|
||||
tput tsl > /dev/null
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo `tput tsl` `whoami`@`hostname` `tput fsl`
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user