Hola como están!
Bueno tengo el siguiente problema, he agregado unas variables de entorno al archivo .bashrc, pero no he logrado recargar la información del fichero, lo que genera error en un script que comprueba la existencia de dichas variables. Lo curioso es que he podido recargar .bashrc como root pero a la hora de ejecutar el script antes mencionado no reconoce que estén seteadas las variables, a continuación les dejo lo que hago y lo que pasa:
Intento como root:
sudo su root
source ~/.bashrc
Hasta aquí todo funcional.
Error al intentar correr el Script con privilegios:
ERROR: Add /usr/local/ps3dev/host/ppu/bin to your path before continuing.
../depends/check-ps3dev.sh: Failed.
Esto se supone que ya está agregado dentro de mi .bashrc son las siguientes lineas:
export PS3DEV=/usr/local/ps3dev
export PATH=$PATH:$PS3DEV/bin
export PATH=$PATH:$PS3DEV/ppu/bin
export PATH=$PATH:$PS3DEV/spu/bin
export PSL1GHT=$PS3DEV/psl1ght
Intento Sin privilegios:
source ~/.bashrc
error:
mkdir: no se puede crear el directorio «/dev/cgroup/cpu/user/8285»: El archivo ya existe
ahora alguna información importante:
$PATH:
bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/ps3dev/bin:/usr/local/ps3dev/ppu/bin:/usr/local/ps3dev/spu/bin: No existe el fichero o el directorio
Al parcer aquí faltan unos directorios que dice no existen. En todo caso los he creado manualmente, pero sigo teniendo el mismo resultado.
ls -al /usr/local/ps3dev:
drwxr-xr-x 6 root root 4096 2011-01-21 21:52 .
drwxr-xr-x 11 root root 4096 2011-01-21 20:38 ..
drwxr-xr-x 2 root root 4096 2011-01-21 21:52 bin
drwxr-xr-x 3 root root 4096 2011-01-21 21:52 ppu
drwxr-xr-x 2 root root 4096 2011-01-21 20:39 psl1ght
drwxr-xr-x 3 root root 4096 2011-01-21 21:51 spu
-rw-r--r-- 1 root root 0 2011-01-21 21:53 test.tmp
ls -al /dev/cgroup/cpu/user:
drwxrwxrwx 9 root root 0 2011-01-21 08:11 .
drwxr-xr-x 3 root root 0 2011-01-21 08:11 ..
drwx------ 2 zero zero 0 2011-01-21 17:54 4696
drwx------ 2 zero zero 0 2011-01-21 19:52 4992
drwx------ 2 root root 0 2011-01-21 20:47 7622
drwx------ 2 zero zero 0 2011-01-21 20:56 8116
drwx------ 2 zero zero 0 2011-01-21 21:05 8228
drwx------ 2 zero zero 0 2011-01-21 21:08 8285
drwx------ 2 zero zero 0 2011-01-21 21:11 8340
--w--w--w- 1 root root 0 2011-01-21 08:11 cgroup.event_control
-r--r--r-- 1 root root 0 2011-01-21 08:11 cgroup.procs
-rw-r--r-- 1 root root 0 2011-01-21 08:11 cpu.rt_period_us
-rw-r--r-- 1 root root 0 2011-01-21 08:11 cpu.rt_runtime_us
-rw-r--r-- 1 root root 0 2011-01-21 08:11 cpu.shares
-rw-r--r-- 1 root root 0 2011-01-21 08:11 notify_on_release
-rw-r--r-- 1 root root 0 2011-01-21 08:11 tasks
Al aplicar rm -r /dev/cgroup/cpu/user/8285 (esto debió haber sido temerario y peligroso, pero igual me arriesgué XD, me he tentado a probar con el parámetro -f pero ya no me arriesgo hasta que no me confirmen que es realmente seguro hacerlo):
rm: no se puede borrar «/dev/cgroup/cpu/user/8285/cpu.rt_period_us»: Operación no permitida
rm: no se puede borrar «/dev/cgroup/cpu/user/8285/cpu.rt_runtime_us»: Operación no permitida
rm: no se puede borrar «/dev/cgroup/cpu/user/8285/cpu.shares»: Operación no permitida
rm: no se puede borrar «/dev/cgroup/cpu/user/8285/cgroup.event_control»: Operación no permitida
rm: no se puede borrar «/dev/cgroup/cpu/user/8285/notify_on_release»: Operación no permitida
rm: no se puede borrar «/dev/cgroup/cpu/user/8285/cgroup.procs»: Operación no permitida
rm: no se puede borrar «/dev/cgroup/cpu/user/8285/tasks»: Operación no permitida
archivo .bashrc:
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color) color_prompt=yes;;
esac
# 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
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
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
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#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'
fi
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
if [ "$PS1" ] ; then
mkdir -m 0700 /dev/cgroup/cpu/user/$$
echo $$ > /dev/cgroup/cpu/user/$$/tasks
fi
export MOZ_DISABLE_PANGO=1
## SDK PlayStation 3
export PS3DEV=/usr/local/ps3dev
export PATH=$PATH:$PS3DEV/bin
export PATH=$PATH:$PS3DEV/ppu/bin
export PATH=$PATH:$PS3DEV/spu/bin
export PSL1GHT=$PS3DEV/psl1ght
linea problemática:
mkdir -m 0700 /dev/cgroup/cpu/user/$$
Espero me puedan brindar ayuda. Gracias