diff options
| author | Carlo Landmeter <clandmeter@gmail.com> | 2011-03-31 08:44:50 +0000 |
|---|---|---|
| committer | Carlo Landmeter <clandmeter@gmail.com> | 2011-03-31 08:44:50 +0000 |
| commit | 756c2c05c7bfa8aa115e55fc78e6ee5293ecd63a (patch) | |
| tree | e7963b4558b507fd81518aa308a4d2d979517542 | |
| parent | 139b9ee7d68a3a119f5bb52f9ee1b6d6e142239f (diff) | |
| download | alpine-baselayout-756c2c05c7bfa8aa115e55fc78e6ee5293ecd63a.tar.bz2 alpine-baselayout-756c2c05c7bfa8aa115e55fc78e6ee5293ecd63a.tar.xz | |
add profile.d support
include sample color prompt
| -rw-r--r-- | Makefile | 3 | ||||
| -rw-r--r-- | color_prompt | 9 | ||||
| -rw-r--r-- | profile | 6 |
3 files changed, 18 insertions, 0 deletions
@@ -25,6 +25,7 @@ ETC_FILES = TZ \ CONFD_FILES = $(addprefix conf.d/, tuntap vlan) UDHCPC_FILES =default.script MODPROBED_FILES =aliases.conf blacklist.conf i386.conf kms.conf +PROFILED_FILES =color_prompt CRONTABS =crontab DISTFILES =$(ETC_FILES) $(UDHCPC_FILES) $(MODPROBED_FILES) Makefile @@ -57,6 +58,7 @@ install: $(GENERATED_FILES) etc/conf.d \ etc/crontabs \ etc/modprobe.d \ + etc/profile.d \ etc/network/if-down.d \ etc/network/if-post-down.d \ etc/network/if-pre-up.d \ @@ -99,6 +101,7 @@ install: $(GENERATED_FILES) install -m 0644 $(CONFD_FILES) $(DESTDIR)/etc/conf.d install -m 0755 $(UDHCPC_FILES) $(DESTDIR)/usr/share/udhcpc install -m 0755 $(MODPROBED_FILES) $(DESTDIR)/etc/modprobe.d + install -m 0755 $(PROFILED_FILES) $(DESTDIR)/etc/profile.d mv $(DESTDIR)/etc/crontab $(DESTDIR)/etc/crontabs/root ln -s /etc/crontabs $(DESTDIR)/var/spool/cron/crontabs ln -s /proc/mounts $(DESTDIR)/etc/mtab diff --git a/color_prompt b/color_prompt new file mode 100644 index 0000000..3749572 --- /dev/null +++ b/color_prompt @@ -0,0 +1,9 @@ +# Setup a red prompt for root and a green one for users. +NORMAL="\[\e[0m\]" +RED="\[\e[1;31m\]" +GREEN="\[\e[1;32m\]" +if [[ "$USER" == root ]] ; then + PS1="$RED\h [$NORMAL\w$RED]# $NORMAL" +else + PS1="$GREEN\h [$NORMAL\w$GREEN]\$ $NORMAL" +fi @@ -3,3 +3,9 @@ export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin export PAGER=less export PS1='\h:\w\$ ' umask 022 + +for script in /etc/profile.d/*.sh ; do + if [ -r $script ] ; then + . $script + fi +done |
