Add Raspbian stages
This commit is contained in:
33
stage1/01-sys-tweaks/00-patches/01-bashrc.diff
Normal file
33
stage1/01-sys-tweaks/00-patches/01-bashrc.diff
Normal file
@@ -0,0 +1,33 @@
|
||||
--- a/rootfs/etc/skel/.bashrc
|
||||
+++ b/rootfs/etc/skel/.bashrc
|
||||
@@ -43,7 +43,7 @@
|
||||
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||
# off by default to not distract the user: the focus in a terminal window
|
||||
# should be on the output of commands, not on the prompt
|
||||
-#force_color_prompt=yes
|
||||
+force_color_prompt=yes
|
||||
|
||||
if [ -n "$force_color_prompt" ]; then
|
||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||
@@ -57,7 +57,7 @@
|
||||
fi
|
||||
|
||||
if [ "$color_prompt" = yes ]; then
|
||||
- PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
||||
+ PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w \$\[\033[00m\] '
|
||||
else
|
||||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||
fi
|
||||
@@ -79,9 +79,9 @@
|
||||
#alias dir='dir --color=auto'
|
||||
#alias vdir='vdir --color=auto'
|
||||
|
||||
- #alias grep='grep --color=auto'
|
||||
- #alias fgrep='fgrep --color=auto'
|
||||
- #alias egrep='egrep --color=auto'
|
||||
+ alias grep='grep --color=auto'
|
||||
+ alias fgrep='fgrep --color=auto'
|
||||
+ alias egrep='egrep --color=auto'
|
||||
fi
|
||||
|
||||
# colored GCC warnings and errors
|
1
stage1/01-sys-tweaks/00-patches/series
Normal file
1
stage1/01-sys-tweaks/00-patches/series
Normal file
@@ -0,0 +1 @@
|
||||
01-bashrc.diff
|
16
stage1/01-sys-tweaks/00-run.sh
Executable file
16
stage1/01-sys-tweaks/00-run.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
install -d ${ROOTFS_DIR}/etc/systemd/system/getty@tty1.service.d
|
||||
install -m 644 files/noclear.conf ${ROOTFS_DIR}/etc/systemd/system/getty@tty1.service.d/noclear.conf
|
||||
install -m 744 files/policy-rc.d ${ROOTFS_DIR}/usr/sbin/policy-rc.d
|
||||
#install -v -m 644 files/fstab ${ROOTFS_DIR}/etc/fstab TODO: Necessary in systemd?
|
||||
|
||||
on_chroot sh -e - <<EOF
|
||||
if ! id -u pi >/dev/null 2>&1; then
|
||||
adduser --disabled-password --gecos "" pi
|
||||
fi
|
||||
echo "pi:raspberry" | chpasswd
|
||||
echo "root:root" | chpasswd
|
||||
EOF
|
||||
|
||||
|
3
stage1/01-sys-tweaks/files/fstab
Normal file
3
stage1/01-sys-tweaks/files/fstab
Normal file
@@ -0,0 +1,3 @@
|
||||
proc /proc proc defaults 0 0
|
||||
/dev/mmcblk0p1 /boot vfat defaults 0 2
|
||||
/dev/mmcblk0p2 / ext4 defaults,noatime 0 1
|
2
stage1/01-sys-tweaks/files/noclear.conf
Normal file
2
stage1/01-sys-tweaks/files/noclear.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
[Service]
|
||||
TTYVTDisallocate=no
|
2
stage1/01-sys-tweaks/files/policy-rc.d
Executable file
2
stage1/01-sys-tweaks/files/policy-rc.d
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exit 101
|
Reference in New Issue
Block a user