Fork me on GitHub

Announcement

The oneye project has been discontinued. You might not expect further fixes and support from us. All community related systems are set to read-only mode. Though feel free to download and use oneye as-is or even fork it over at GitHub.

#1 2011-08-17 10:52:24

eveline
Member
Registered: 2011-07-29
Posts: 14

How to make EyeOS store homedirs in custom paths?

From the old forums:

----
Hi there,

I'd like to know if it's possible to make EyeOS store it's userdata in a path like this:

/home/e/eveline/.eyeOS/
/home/u/user/.eyeOS/
/home/e/example/.eyeOS/

I see it now does something like this:

/etc/apache2/htdocs/ourhostname/eyeOS/eyeOSd03c7eebe8/users/ee7/eveline/

Of course I can make the NFS mountpoint to our netapps inside the "eyeOSd03c7eebe8/users/" dir, but that won't solve the whole problem.

Thanks in advance for any replies.

Regards,

Eveline.
----

---

Just check the php function "getAcronim" in eyeOSxxxxxxxxxx/system/services/um/modules/eyeos.eyecode .

Changing it to the following should do what you need...

Code:
function getAcronim($params) {
    if (!$params[0]) {
        errorCodes('setErrorCode',array(INCORRECT_PARAMS));
        return false;
    }
    return $username{0};
}
Report to moderator     Logged
Regards,
Lars Knickrehm
---

---
Hmmm... I did what you said, I changed it this way:

----
#function getAcronim($params){
#       
#       $username = $params[0];
#       if(!$username) {
#               errorCodes('setErrorCode',array(INCORRECT_PARAMS));
#               return false;
#       }
#       $userLenght = utf8_strlen($username);
#       //Generate de dir, remove $userDir ? maybe.
#       return $username{0}.$username{$userLenght-1}.utf8_substr($userLenght,-1);
#}

# op advies van http://forums.eyeos.org/index.php/topic … l#msg26910
function getAcronim($params) {
        if (!$params[0]) {
                errorCodes('setErrorCode',array(INCORRECT_PARAMS));
                return false;
        }
        return $username{0};
}               
---

And now EyeOS is broken. I can't even sign out anymore! A reload results in a broken page.

I changed it back into it's original state, and now EyeOS works again.

Other ideas?
---

---
I used this trick on a lot systems, so that's not the problem. I'd need to have a closer look at your settings.php and best a simple demo user to test where's the problem. Maybe there are some ugly hardcoded parts somewhere in the eyeos series 1 code (yes, that code is ugly in some cases!)...

Btw: Please continue at http://forums.lars-sh.de/ where we continue support for eyeos series 1.
----

So here we are. My settings.php:

----------

[ Lars Knickrehm: Contents of your settings.php are just the default ones of eyeos 1.9.0.3. ]

-------

A test user can't be setup that easily, because this setup is behind lots of firewalls that won't be taken down untill we're sure everything works as we'd like.

Offline

#2 2011-08-17 21:01:23

lars-sh
Administrator
From: near Hamburg, Germany
Registered: 2011-07-14
Posts: 731
Website

Re: How to make EyeOS store homedirs in custom paths?

I changed [eyeos]/eyeOSxxxxxxxxxx/users/rt4/root to [eyeos]/eyeOSxxxxxxxxxx/users/r/root.

Do you want to change [eyeos]/eyeOSxxxxxxxxxx/users/rt4/root to /home/r/root?


Best regards,
Lars Knickrehm

The oneye project.

Offline

#3 2011-08-23 13:23:38

eveline
Member
Registered: 2011-07-29
Posts: 14

Re: How to make EyeOS store homedirs in custom paths?

Yes, and the same for all the other users. /home/e/eveline, /home/u/username, etc. Automatically on creation of the account.

lars-sh wrote:

I changed [eyeos]/eyeOSxxxxxxxxxx/users/rt4/root to [eyeos]/eyeOSxxxxxxxxxx/users/r/root.

Do you want to change [eyeos]/eyeOSxxxxxxxxxx/users/rt4/root to /home/r/root?

Offline

#4 2011-08-24 03:04:50

lars-sh
Administrator
From: near Hamburg, Germany
Registered: 2011-07-14
Posts: 731
Website

Re: How to make EyeOS store homedirs in custom paths?

eveline wrote:

Yes, and the same for all the other users. /home/e/eveline, /home/u/username, etc. Automatically on creation of the account.

Sure, for all users...

Okay, so please check if the changed function works in case you change [eyeos]/eyeOSxxxxxxxxxx/users/rt4/root to [eyeos]/eyeOSxxxxxxxxxx/users/r/root first (in order to make sure that works).

Finally edit settings.php and change USERS_DIR to a relative path. Example to to change from /var/www/eyeos/eyeOSxxxxxxxxxx/users to /home:

define('USERS_DIR', '../../../../home');

Best regards,
Lars Knickrehm

The oneye project.

Offline

#5 2011-08-24 15:05:24

eveline
Member
Registered: 2011-07-29
Posts: 14

Re: How to make EyeOS store homedirs in custom paths?

Thanks!

lars-sh wrote:
eveline wrote:

Yes, and the same for all the other users. /home/e/eveline, /home/u/username, etc. Automatically on creation of the account.

Sure, for all users...

Okay, so please check if the changed function works in case you change [eyeos]/eyeOSxxxxxxxxxx/users/rt4/root to [eyeos]/eyeOSxxxxxxxxxx/users/r/root first (in order to make sure that works).

Finally edit settings.php and change USERS_DIR to a relative path. Example to to change from /var/www/eyeos/eyeOSxxxxxxxxxx/users to /home:

define('USERS_DIR', '../../../../home');

Offline

Board footer

Powered by FluxBB