diff options
author | Cem Keylan <cem@ckyln.com> | 2020-05-22 02:13:09 +0300 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2020-05-22 02:13:09 +0300 |
commit | 237b3aa53bd2d67890a142ca7365e82a8c067216 (patch) | |
tree | df6afe689a2417c16104a3858d5ae2ad31555cd2 | |
parent | fa01e03fe155293a91ef95add7fd9768b89ee577 (diff) | |
download | init-237b3aa53bd2d67890a142ca7365e82a8c067216.tar.gz |
init: move mnt function rc.lib
-rwxr-xr-x | rc.boot | 9 | ||||
-rw-r--r-- | rc.lib | 9 |
2 files changed, 9 insertions, 9 deletions
@@ -6,15 +6,6 @@ . /usr/lib/init/rc.lib [ -f /etc/init/rc.conf ] && . /etc/init/rc.conf -mnt() { - [ -f /proc/mounts ] && while read -r _ mnt _; do - case "$mnt" in "$1") return 0; esac - done < /proc/mounts - - mnt="$1"; shift - mount "$@" "$mnt" 2>&1 | log -} - # Display a pretty welcome message printf '\033[1;36m-> \033[39mWelcome to \033[35mCarbs %s\033[39m!\033[m\n' "$(uname -s)" @@ -75,3 +75,12 @@ parse_cmdline() { esac done } + +mnt() { + [ -f /proc/mounts ] && while read -r _ mnt _; do + case "$mnt" in "$1") return 0; esac + done < /proc/mounts + + mnt="$1"; shift + mount "$@" "$mnt" 2>&1 | log +} |