From 5d1518bd911076d61a9f60fd39b1a545bd10f6fc Mon Sep 17 00:00:00 2001 From: noon92 <40807970+noon92@users.noreply.github.com> Date: Mon, 10 Feb 2025 20:39:18 +0200 Subject: [PATCH] Update femto-runonce.sh --- .../usr/local/bin/femto-runonce.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-runonce.sh b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-runonce.sh index 7ffb9de..9776b6c 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-runonce.sh +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-runonce.sh @@ -19,13 +19,14 @@ Re-running this script will:\n\ * Allocate the swap file\n\ * Replace the SSH encryption keys\n\ * Add terminal type to user femto's .bashrc\n\ +* Add a shortcut \`sfc\` to femto's .bashrc\n\ * Set the eth0 MAC to be derivative of CPU serial number\n\ \n\ Finally, the Femtofox will reboot.\n\ \n\ Re-running this script after first boot should not cause any harm, but may not work as expected.\n\ \n\ -Proceed?" 19 60 +Proceed?" 20 60 if [ $? -eq 1 ]; then #if cancel/no exit 0 fi @@ -97,11 +98,11 @@ else fi # Add a cheeky alias to .bash_aliases -if ! grep -Fxq "alias sfc='sudo femto-config'" /home/femto/.bash_aliases; then # Check if the lines are already in .bash_aliases - echo "alias sfc='sudo femto-config'" >> /home/femto/.bash_aliases - echo "alias sfc='sudo femto-config' to .bash_aliases" +if ! grep -Fxq "alias sfc='sudo femto-config'" /home/femto/.bashrc; then # Check if the lines are already in .bash_aliases + echo "alias sfc='sudo femto-config'" >> /home/femto/.bashrc + echo "Added alias sfc='sudo femto-config' to .bashrc" else - echo "alias sfc='sudo femto-config' already present in .bash_aliases, skipping" + echo "alias sfc='sudo femto-config' already present in .bashrc, skipping" fi # remove first boot flag